ibcs2_other.c (225617) | ibcs2_other.c (274476) |
---|---|
1/*- 2 * Copyright (c) 1995 Steven Wallace 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 25#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1995 Steven Wallace 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 25#include <sys/cdefs.h> |
26__FBSDID("$FreeBSD: head/sys/i386/ibcs2/ibcs2_other.c 225617 2011-09-16 13:58:51Z kmacy $"); | 26__FBSDID("$FreeBSD: head/sys/i386/ibcs2/ibcs2_other.c 274476 2014-11-13 18:01:51Z kib $"); |
27 28/* 29 * IBCS2 compatibility module. 30 */ 31 32#include "opt_spx_hack.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> | 27 28/* 29 * IBCS2 compatibility module. 30 */ 31 32#include "opt_spx_hack.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> |
36#include <sys/fcntl.h> |
|
36#include <sys/lock.h> 37#include <sys/mutex.h> 38#include <sys/syscallsubr.h> 39#include <sys/sysproto.h> 40#include <sys/un.h> 41 42#include <i386/ibcs2/ibcs2_types.h> 43#include <i386/ibcs2/ibcs2_signal.h> --- 58 unchanged lines hidden (view full) --- 102 103 /* connect the socket to standard X socket */ 104 DPRINTF(("SPX: connect to /tmp/X11-unix/X0\n")); 105 sun.sun_family = AF_UNIX; 106 strcpy(sun.sun_path, "/tmp/.X11-unix/X0"); 107 sun.sun_len = sizeof(struct sockaddr_un) - sizeof(sun.sun_path) + 108 strlen(sun.sun_path) + 1; 109 | 37#include <sys/lock.h> 38#include <sys/mutex.h> 39#include <sys/syscallsubr.h> 40#include <sys/sysproto.h> 41#include <sys/un.h> 42 43#include <i386/ibcs2/ibcs2_types.h> 44#include <i386/ibcs2/ibcs2_signal.h> --- 58 unchanged lines hidden (view full) --- 103 104 /* connect the socket to standard X socket */ 105 DPRINTF(("SPX: connect to /tmp/X11-unix/X0\n")); 106 sun.sun_family = AF_UNIX; 107 strcpy(sun.sun_path, "/tmp/.X11-unix/X0"); 108 sun.sun_len = sizeof(struct sockaddr_un) - sizeof(sun.sun_path) + 109 strlen(sun.sun_path) + 1; 110 |
110 error = kern_connect(td, fd, (struct sockaddr *)&sun); | 111 error = kern_connectat(td, AT_FDCWD, fd, (struct sockaddr *)&sun); |
111 if (error) { 112 kern_close(td, fd); 113 return error; 114 } 115 td->td_retval[0] = fd; 116 return 0; 117} 118#endif /* SPX_HACK */ | 112 if (error) { 113 kern_close(td, fd); 114 return error; 115 } 116 td->td_retval[0] = fd; 117 return 0; 118} 119#endif /* SPX_HACK */ |