summaryrefslogtreecommitdiff
path: root/net/freeradius/patches/patch-main_util.c
blob: 64f86ec342ce8a9ed99a1f3c4316bd6ecb96e1af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-main_util.c,v 1.1 2017/08/26 10:07:28 fhajny Exp $
O_DIRECTORY to open(2) is a Linuxism.

--- src/main/util.c.orig	2016-09-29 15:19:48.000000000 +0000
+++ src/main/util.c
@@ -31,6 +31,14 @@ RCSID("$Id: 22299f8c8d6bc98616fa025ee3da
 #include <fcntl.h>
 
 /*
+ *      Not all libc implmenetations have O_DIRECTORY to pass to
+ *      open(2)
+ */
+#ifndef O_DIRECTORY
+#define O_DIRECTORY 0
+#endif
+
+/*
  *	The signal() function in Solaris 2.5.1 sets SA_NODEFER in
  *	sa_flags, which causes grief if signal() is called in the
  *	handler before the cause of the signal has been cleared.