summaryrefslogtreecommitdiffstats
path: root/libutil
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-12-02 15:56:18 +0000
committerEd Schouten <ed@FreeBSD.org>2009-12-02 15:56:18 +0000
commit39568873e3f7967d6882ac64195cf47c2836e62a (patch)
tree68fc39cb8b4ea20acc0365661a059814d93767dc /libutil
parentac2ff2f73f6c37b44d2ab12c0a0cdbcf37be8eb3 (diff)
downloadpw-darwin-39568873e3f7967d6882ac64195cf47c2836e62a.tar.gz
pw-darwin-39568873e3f7967d6882ac64195cf47c2836e62a.tar.zst
pw-darwin-39568873e3f7967d6882ac64195cf47c2836e62a.zip
Make <libutil.h> work when included by itself.
There are several reasons why it didn't work: - It was missing <sys/cdefs.h> for __BEGIN_DECLS. - It uses various primitive types that were not declared.
Diffstat (limited to 'libutil')
-rw-r--r--libutil/libutil.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/libutil/libutil.h b/libutil/libutil.h
index 3187fb3..fca133f 100644
--- a/libutil/libutil.h
+++ b/libutil/libutil.h
@@ -39,6 +39,34 @@
#ifndef _LIBUTIL_H_
#define _LIBUTIL_H_
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+#ifndef _GID_T_DECLARED
+typedef __gid_t gid_t;
+#define _GID_T_DECLARED
+#endif
+
+#ifndef _INT64_T_DECLARED
+typedef __int64_t int64_t;
+#define _INT64_T_DECLARED
+#endif
+
+#ifndef _PID_T_DECLARED
+typedef __pid_t pid_t;
+#define _PID_T_DECLARED
+#endif
+
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
+#endif
+
+#ifndef _UID_T_DECLARED
+typedef __uid_t uid_t;
+#define _UID_T_DECLARED
+#endif
+
#define PROPERTY_MAX_NAME 64
#define PROPERTY_MAX_VALUE 512