Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Use the features defined by cc-check-decls
Pietro Cerutti committed 8 years ago
commit 67c5a0a49d151ccc93d00107bdc0915095ded777
parent 60d1d8a
3 files changed +4 -10
modified auto.def
@@ -112,17 +112,11 @@ foreach fct $fatal_functions {
}

cc-with { -includes fcntl.h } {
-
	if {[cc-check-decls F_CLOSEM]} {
-
		define-feature f_closem 1
-
	} else {
-
		define-feature f_closem 0
-
	}
+
	cc-check-decls F_CLOSEM
}

cc-with { -includes sys/socket.h } {
-
	if {[cc-check-decls SOCK_SEQPACKET]} {
-
		define-feature seqpacket
-
	}
+
	cc-check-decls SOCK_SEQPACKET
}

cc-with { -includes netinet/in.h } {
modified compat/closefrom.c
@@ -58,7 +58,7 @@ __unused static const char rcsid[] = "$Sudo: closefrom.c,v 1.11 2006/08/17 15:26
/*
 * Close all file descriptors greater than or equal to lowfd.
 */
-
#ifdef HAVE_F_CLOSEM
+
#ifdef HAVE_DECL_F_CLOSEM
void
closefrom(int lowfd)
{
modified libpkg/pkg_repo_create.c
@@ -629,7 +629,7 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
			int ofl;
			int st = SOCK_DGRAM;

-
#ifdef HAVE_SEQPACKET
+
#ifdef HAVE_DECL_SOCK_SEQPACKET
			st = SOCK_SEQPACKET;
#endif
			if (socketpair(AF_UNIX, st, 0, cur_pipe) == -1) {