aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/lib
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-08-22 20:04:51 +0000
committerXin LI <delphij@FreeBSD.org>2014-08-22 20:04:51 +0000
commit4ddb46f694a0db537f093297b7d00b46181aa00e (patch)
tree8a5d6970efa63e0664d1bca3c052d034cea31c9e /cddl/contrib/opensolaris/lib
parentd77e67e495266d993f07d5b20822faf127bd1948 (diff)
downloadsrc-4ddb46f694a0db537f093297b7d00b46181aa00e.tar.gz
src-4ddb46f694a0db537f093297b7d00b46181aa00e.zip
Make DTrace stuff compile with C99 standard.
Notes
Notes: svn path=/head/; revision=270358
Diffstat (limited to 'cddl/contrib/opensolaris/lib')
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h5
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c5
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c1
-rw-r--r--cddl/contrib/opensolaris/lib/libgen/common/gmatch.c1
4 files changed, 12 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
index b7abbc2fddc9..8cf5fe2d140b 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
@@ -723,6 +723,11 @@ extern int _dtrace_argmax; /* default maximum probe arguments */
extern const char *_dtrace_libdir; /* default library directory */
extern const char *_dtrace_moddir; /* default kernel module directory */
+#ifdef __FreeBSD__
+extern int gmatch(const char *, const char *);
+extern int yylex(void);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
index f6c140bdeec8..0eb2a2cdcc2f 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
@@ -29,6 +29,11 @@
#if defined(sun)
#include <sys/modctl.h>
#include <sys/systeminfo.h>
+#else
+/* FreeBSD */
+#include <sys/param.h>
+#include <sys/module.h>
+#include <sys/linker.h>
#endif
#include <sys/resource.h>
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c
index 760c2f675788..7f49f640a944 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <sys/types.h>
+#include <sys/sysctl.h>
#include <sys/stat.h>
#include <dt_parser.h>
diff --git a/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c b/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c
index fe4a3825a7a6..199fbb356036 100644
--- a/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c
+++ b/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c
@@ -42,6 +42,7 @@
#include <widec.h>
#include "_range.h"
#else
+#include <ctype.h>
/* DOODAD */ static int multibyte = 0;
#define WCHAR_CSMASK 0x30000000
#define valid_range(c1, c2) \