[PATCH v4 21/35] libctf: get rid of a disruptive public include of <sys/param.h>
Nick Alcock
nick.alcock@oracle.com
Tue Sep 24 13:52:00 GMT 2019
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(-)
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>
--
2.23.0.239.g28aa4420fd
More information about the Binutils
mailing list