This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 17/19] libctf: get rid of a disruptive public include of <sys/param.h>
- From: Nick Alcock <nick dot alcock at oracle dot com>
- To: binutils at sourceware dot org
- Cc: elena dot zannoni at oracle dot com, jose dot marchesi at oracle dot com, indu dot bhagat at oracle dot com, egeyar dot bagcioglu at oracle dot com
- Date: Tue, 16 Jul 2019 19:04:18 +0100
- Subject: [PATCH 17/19] libctf: get rid of a disruptive public include of <sys/param.h>
- References: <20190716180420.236506-1-nick.alcock@oracle.com>
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 ac20551917..37a4d817fd 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 0b72866b30..683f395160 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.22.0.238.g049a27acdc