Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do not rely on non-portable definitions
Daniel Kolesa committed 3 years ago
commit 1de66b2fb2d77c622669217926082e54f45654d1
parent 4570ef2
10 files changed +10 -9
modified auto.def
@@ -272,7 +272,7 @@ cc-with { -libs { -ljail} } {
# libbsd
cc-check-includes bsd/err.h bsd/libutil.h bsd/readpassphrase.h \
	bsd/stdio.h bsd/stdlib.h bsd/strlib.h bsd/string.h \
-
	bsd/sys/cdefs.h bsd/unistd.h
+
	bsd/sys/cdefs.h bsd/sys/queue.h bsd/unistd.h
 
if {[opt-bool with-asan]} {
	define-append ASAN_CFLAGS -O0 -ggdb -fsanitize=address
modified compat/bsd_compat.h
@@ -37,7 +37,11 @@
 #endif
#endif

-
#ifdef HAVE_BSD_SYS_CDEFS_H
+
#ifndef HAVE_BSD_SYS_CDEFS_H
+

+
#include <sys/cdefs.h>
+

+
#else

/* Deal with broken __DECONST */
#ifndef __uintptr_t
modified compat/strnstr.c
@@ -31,7 +31,6 @@
 * SUCH DAMAGE.
 */

-
#include <sys/cdefs.h>
#include <string.h>

#if !HAVE_STRNSTR
modified libpkg/flags.c
@@ -35,7 +35,6 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)flags.c	8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
-
#include <sys/cdefs.h>
#include "bsd_compat.h"
__FBSDID("$FreeBSD: head/lib/libc/stdio/flags.c 326025 2017-11-20 19:49:47Z pfg $");

modified libpkg/pkg.h.in
@@ -40,7 +40,6 @@ extern "C" {

#include <sys/types.h>
#include <sys/param.h>
-
#include <sys/cdefs.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
modified src/audit.c
@@ -29,7 +29,6 @@
#include "pkg_config.h"

#include <sys/param.h>
-
#include <sys/queue.h>
#include <sys/stat.h>
#include <sys/mman.h>

modified src/check.c
@@ -28,7 +28,6 @@
 */

#include <sys/param.h>
-
#include <sys/queue.h>

#include <err.h>
#include <assert.h>
modified src/create.c
@@ -32,7 +32,6 @@
#endif

#include <sys/param.h>
-
#include <sys/queue.h>

#ifdef PKG_COMPAT
#include <sys/stat.h>
modified src/main.c
@@ -36,7 +36,6 @@
#include <sys/param.h>

#include <sys/stat.h>
-
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/wait.h>
#ifdef __FreeBSD__
modified src/updating.c
@@ -33,7 +33,11 @@
#include <sys/capsicum.h>
#endif

+
#ifdef HAVE_BSD_SYS_QUEUE_H
+
#include <bsd/sys/queue.h>
+
#else
#include <sys/queue.h>
+
#endif

#include <err.h>
#include <errno.h>