diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index 953e961dc..e8db73446 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -4,6 +4,10 @@ # net sources .if defined(__MINIX) .PATH: ${.CURDIR}/net/minix + +CPPFLAGS.getpeereid.c+= -D_MINIX_SYSTEM=1 +CPPFLAGS.getsockopt.c+= -D_MINIX_SYSTEM=1 +CPPFLAGS.setsockopt.c+= -D_MINIX_SYSTEM=1 .endif .PATH: ${ARCHDIR}/net ${.CURDIR}/net diff --git a/sys/sys/socket.h b/sys/sys/socket.h index cfea65855..e910d1656 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -131,7 +131,8 @@ typedef _BSD_SSIZE_T_ ssize_t; #define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ #define SO_TIMESTAMP 0x2000 /* timestamp received dgram traffic */ -#if defined(__minix) +#if defined(__minix) && defined(_MINIX_SYSTEM) +/* Minixism which should go, so hide it from userland. */ #define SO_PASSCRED 0x100000 #define SO_PEERCRED 0x200000 #endif /* defined(__minix) */ diff --git a/test/Makefile b/test/Makefile index 80e59d494..410c5b798 100644 --- a/test/Makefile +++ b/test/Makefile @@ -26,6 +26,8 @@ COPTS.test51.c= -mhard-float COPTS.test52.c= -mhard-float .endif +CPPFLAGS.test56.c += -D_MINIX_SYSTEM=1 + WARNS= COPTS.test9.c= -O0 COPTS.test37.c= -O0