mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-08 03:24:13 +00:00
Only define struct ucred if <sys/socket.h> does not provide it
This commit is contained in:
parent
75e925a8b5
commit
490d9ef472
@ -79,7 +79,7 @@ LOCAL_CFLAGS += \
|
||||
-DHAVE_ERRNO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 \
|
||||
-DHAVE_STRING_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_SOCKET_H=1 \
|
||||
-DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_POLL_H=1 -DHAVE_NETDB_H=1 \
|
||||
-DHAVE_JNI_H=1 -DBYTE_ORDER=_BYTE_ORDER \
|
||||
-DHAVE_JNI_H=1 -DHAVE_STRUCT_UCRED=1 -DBYTE_ORDER=_BYTE_ORDER \
|
||||
-I$(NACL_INC) \
|
||||
-I$(SQLITE3_INC)
|
||||
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
|
||||
|
@ -37,6 +37,11 @@ dnl Math library functions for spandsp
|
||||
AC_CHECK_HEADERS([math.h], [INSERT_MATH_HEADER="#include <math.h>"])
|
||||
AC_CHECK_HEADERS([float.h])
|
||||
|
||||
dnl Math library functions for spandsp
|
||||
AC_CHECK_MEMBER(struct ucred.uid,
|
||||
[AC_DEFINE([HAVE_STRUCT_UCRED], 1)],,
|
||||
[#include <sys/socket.h>])
|
||||
|
||||
dnl Check for a working Java compiler, keep going if unsuccessful.
|
||||
dnl *** Kludge: override AC_MSG_ERROR because AC_PROG_JAVAC does not have
|
||||
dnl *** [if-found] and [if-not-found] action parameters.
|
||||
|
@ -26,14 +26,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#include "serval.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* Need a better way to do this! */
|
||||
#ifndef ANDROID
|
||||
#ifndef HAVE_STRUCT_UCRED
|
||||
struct ucred {
|
||||
pid_t pid;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
};
|
||||
#endif
|
||||
#endif // HAVE_STRUCT_UCRED
|
||||
|
||||
/* really shouldn't need more than 2:
|
||||
1 for rhizome
|
||||
|
Loading…
x
Reference in New Issue
Block a user