summarylogtreecommitdiffstats
path: root/lirc-0.10-build-fix.patch
blob: 41353dbbdcfe3ac06500c648d353720b07037bb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/configure.ac b/configure.ac
index 58347d8..8c7fca2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,15 +77,10 @@ AC_TYPE_UINT64_T
 
 dnl AC_TYPE_GETGROUPS seems broken on recent MacOS, so:
 AC_MSG_CHECKING([Figure out if getgrouplist() needs gid_t or int])
-oldcflags="$CFLAGS"
-export CFLAGS=-Werror
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <unistd.h>
-#include <grp.h>
-  ]], [[
-gid_t groups[32]; int ngroups; const char* user = "root";
-getgrouplist(user, 1, groups, &ngroups);
-  ]])],[
+int getgroups(int gidsetsize, gid_t grouplist[]);
+  ]], [[  ]])],[
     AC_MSG_RESULT(gid_t)
     AC_DEFINE(GETGROUPS_T,[gid_t])
   ],[
@@ -93,7 +88,6 @@ getgrouplist(user, 1, groups, &ngroups);
     AC_DEFINE(GETGROUPS_T,[int])
   ]
 )
-export CFLAGS="$oldcflags"
 
 dnl Checks for library functions.
 AC_CHECK_FUNCS(gethostname gettimeofday mkfifo select socket strdup \