Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
pkg: fix build on glibc gnu/linux and a few other things
rilysh committed 2 years ago
commit ed0550cabaf1c147f6f7102a8a384881452547c1
parent c47df8b
4 files changed +13 -8
modified compat/bsd_compat.h
@@ -163,7 +163,7 @@ char * strnstr(const char *s, const char *find, size_t slen);
#endif

#ifndef __unused
-
#ifdef __GNUC__
+
#if defined(__GNUC__) || defined(__clang__)
# define __unused __attribute__((__unused__))
#else
# define __unused
modified libpkg/pkg_audit.c
@@ -40,6 +40,12 @@

#include <yxml.h>

+
#ifdef __linux__
+
# ifdef __GLIBC__
+
#  include <sys/time.h>
+
# endif
+
#endif
+

#include "pkg.h"
#include "pkg/audit.h"
#include "private/pkg.h"
modified libpkg/pkg_sandbox.c
@@ -46,6 +46,12 @@
#include <signal.h>
#include <pwd.h>

+
#ifdef __linux__
+
# ifdef __GLIBC__
+
#  include <grp.h>
+
# endif
+
#endif
+

#include "pkg.h"

int
modified libpkg/private/pkg.h
@@ -66,13 +66,6 @@
# define MAXLOGNAME 64
# endif
#endif
-
#ifndef __unused
-
# ifdef __GNUC__
-
# define __unused __attribute__ ((__unused__))
-
# else
-
# define __unused
-
# endif
-
#endif

#ifndef nitems
#define nitems(x)       (sizeof((x)) / sizeof((x)[0]))