Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do not compile gr_util.c on FreeBSD 10
Baptiste Daroussin committed 14 years ago
commit 2317488a3f015cd40f58363e5b815429c4d58852
parent d0b71f2
2 files changed +11 -3
modified libpkg/Makefile
@@ -27,8 +27,13 @@ SRCS= pkg.c \
		packing.c \
		scripts.c \
		rcscripts.c \
-
		usergroup.c \
-
		gr_util.c
+
		usergroup.c
+

+
OSVERSION!=	awk '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' /usr/include/sys/param.h
+

+
.if ${OSVERSION} < 1000000
+
SRC+=	gr_util.c
+
.endif

CFLAGS+=	-std=c99
CFLAGS+=	-I${.CURDIR} \
modified libpkg/usergroup.c
@@ -1,3 +1,4 @@
+
#include <sys/param.h>
#include <sys/types.h> /* needed type libutl.h on 8.X */

#include <grp.h>
@@ -5,7 +6,9 @@
#include <libutil.h>
#include <string.h>

-
#include "gr_util.h" /* has to be dropped when gr_* will be in base */
+
#if __FreeBSD_version < 1000000
+
#include "gr_util.h"
+
#endif
#include "pkg.h"
#include "pkg_event.h"
#include "pkg_private.h"