void-packages/srcpkgs/opensmtpd/patches/musl-mode_values.patch

24 lines
569 B
Diff
Raw Normal View History

2015-10-02 10:31:21 +02:00
Despit these macros being defined in sys/stat.h, they are undefined
when used in the source strmode.c, perhaps due to the shielding macro
S_IRUSR being defined before.
--- openbsd-compat/strmode.c 2015-10-02 01:46:21.000000000 +0200
+++ openbsd-compat/strmode.c 2015-10-02 08:38:43.954398930 +0200
@@ -37,6 +37,16 @@
#include <sys/stat.h>
#include <string.h>
+#if !defined(S_ISUID)
+#define S_ISUID 04000
+#endif
+#if !defined(S_ISGID)
+#define S_ISGID 02000
+#endif
+#if !defined(S_ISVTX)
+#define S_ISVTX 01000
+#endif
+
/* XXX mode should be mode_t */
void