This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Prevent GCC 6 <cstdlib> from including /usr/include/stdlib.h


Otherwise, /usr/include/stdlib.h turns up as a make dependency,
and an implicit rule will kick and make will try to install
stdlib/stdlib.h as /usr/include/stdlib.h because the target
is out of date.

2016-06-08  Florian Weimer  <fweimer@redhat.com>

	Prevent GCC 6 <cstdlib> from including /usr/include/stdlib.h.
	* stdlib/tst-quick_exit.cc: Include <stdlib.h> before <cstdlib>.
	* stdlib/tst-thread-quick_exit.cc: Likewise.

diff --git a/stdlib/tst-quick_exit.cc b/stdlib/tst-quick_exit.cc
index c4a15a9..6e6a503 100644
--- a/stdlib/tst-quick_exit.cc
+++ b/stdlib/tst-quick_exit.cc
@@ -15,6 +15,8 @@
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
 #include <cstdlib>
 
 struct A
diff --git a/stdlib/tst-thread-quick_exit.cc b/stdlib/tst-thread-quick_exit.cc
index 307d2a2..703f8c1 100644
--- a/stdlib/tst-thread-quick_exit.cc
+++ b/stdlib/tst-thread-quick_exit.cc
@@ -15,6 +15,8 @@
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
 #include <cstdlib>
 #include <thread>
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]