75c4104e44
instead of patching configure, to minize headaches for updates of this port.
51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
$OpenBSD: patch-configure_ac,v 1.1 2012/11/06 21:24:16 kili Exp $
|
|
|
|
ucred is sockpeercred on OpenBSD
|
|
|
|
--- configure.ac.orig Tue Apr 24 05:19:39 2012
|
|
+++ configure.ac Tue Nov 6 22:06:51 2012
|
|
@@ -64,16 +64,16 @@ AC_EGREP_HEADER(in_addr_t, netinet/in.h,
|
|
AC_MSG_RESULT(no))
|
|
|
|
dnl --------------------------------------------------
|
|
-dnl * test for SO_PEERCRED and struct ucred
|
|
+dnl * test for SO_PEERCRED and struct sockpeercred
|
|
dnl --------------------------------------------------
|
|
-AC_MSG_CHECKING(for SO_PEERCRED and struct ucred in sys/socket.h)
|
|
+AC_MSG_CHECKING(for SO_PEERCRED and struct sockpeercred in sys/socket.h)
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#ifndef SO_PEERCRED
|
|
# error no SO_PEERCRED
|
|
#endif
|
|
-struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no)
|
|
-if test "x$ac_cv_ucred" = xno; then
|
|
+struct sockpeercred u;]])],ac_cv_sockpeercred=yes,ac_cv_sockpeercred=no)
|
|
+if test "x$ac_cv_sockpeercred" = xno; then
|
|
old_CFLAGS="$CFLAGS"
|
|
CFLAGS="-D_GNU_SOURCE $CFLAGS"
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
|
@@ -81,18 +81,18 @@ if test "x$ac_cv_ucred" = xno; then
|
|
#ifndef SO_PEERCRED
|
|
# error no SO_PEERCRED
|
|
#endif
|
|
-struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no)
|
|
- if test "x$ac_cv_ucred" = xyes; then
|
|
+struct sockpeercred u;]])],ac_cv_sockpeercred=yes,ac_cv_sockpeercred=no)
|
|
+ if test "x$ac_cv_sockpeercred" = xyes; then
|
|
EXTRA_CPPFLAGS=-D_GNU_SOURCE
|
|
fi
|
|
else
|
|
old_CFLAGS="$CFLAGS"
|
|
fi
|
|
-if test "x$ac_cv_ucred" = xno; then
|
|
+if test "x$ac_cv_sockpeercred" = xno; then
|
|
CFLAGS="$old_CFLAGS"
|
|
AC_MSG_RESULT(no)
|
|
else
|
|
- AC_DEFINE([HAVE_STRUCT_UCRED], [1], [Define to 1 if you have both SO_PEERCRED and struct ucred.])
|
|
+ AC_DEFINE([HAVE_STRUCT_SOCKPEERCRED], [1], [Define to 1 if you have both SO_PEERCRED and struct sockpeercred.])
|
|
AC_MSG_RESULT(yes)
|
|
fi
|
|
|