[libxml2/2.9] Define LFS macros before including system headers



commit f687f3e002777934d101033c9baab6db7fa83406
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed Apr 27 12:39:12 2022 +0200

    Define LFS macros before including system headers
    
    xmlstring.h includes stdarg.h, so it must be included after defining
    macros like _FILE_OFFSET_BITS.

 libxml.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libxml.h b/libxml.h
index 1090729c..d40fcf86 100644
--- a/libxml.h
+++ b/libxml.h
@@ -9,8 +9,10 @@
 #ifndef __XML_LIBXML_H__
 #define __XML_LIBXML_H__
 
-#include <libxml/xmlstring.h>
-
+/*
+ * These macros must be defined before including system headers.
+ * Do not add any #include directives above this block.
+ */
 #ifndef NO_LARGEFILE_SOURCE
 #ifndef _LARGEFILE_SOURCE
 #define _LARGEFILE_SOURCE
@@ -39,6 +41,7 @@
 #include "config.h"
 #include <libxml/xmlversion.h>
 #endif
+#include <libxml/xmlstring.h>
 
 #if defined(__Lynx__)
 #include <stdio.h> /* pull definition of size_t */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]