[v4,21/35] libctf: get rid of a disruptive public include of <sys/param.h>

Message ID 20190924135131.441906-22-nick.alcock@oracle.com
State New
Headers show
Series
  • CTF linking support
Related show

Commit Message

Nick Alcock Sept. 24, 2019, 1:51 p.m.
This hoary old header defines things like MAX that users of libctf might
perfectly reasonably define themselves.

The CTF headers do not need it: move it into libctf/ctf-impl.h instead.

include/
	* ctf-api.h (includes): No longer include <sys/param.h>.
libctf/
	* ctf-impl.h (includes): Include <sys/param.h> here.
---
 include/ctf-api.h | 1 -
 libctf/ctf-impl.h | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

-- 
2.23.0.239.g28aa4420fd

Patch

diff --git a/include/ctf-api.h b/include/ctf-api.h
index 4ac5fea8bc6..f50bb0a0199 100644
--- a/include/ctf-api.h
+++ b/include/ctf-api.h
@@ -24,7 +24,6 @@ 
 #ifndef	_CTF_API_H
 #define	_CTF_API_H
 
-#include <sys/param.h>
 #include <sys/types.h>
 #include <ctf.h>
 #include <zlib.h>
diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h
index c08400c45d4..ab8f4c18b33 100644
--- a/libctf/ctf-impl.h
+++ b/libctf/ctf-impl.h
@@ -22,6 +22,7 @@ 
 
 #include "config.h"
 #include <errno.h>
+#include <sys/param.h>
 #include "ctf-decls.h"
 #include <ctf-api.h>
 #include <sys/types.h>