Skip to content

Commit 101eecc

Browse files
committed
Merge pull request matplotlib#3684 from mdboom/fix-order-of-includes
Build failure on Launchpad
2 parents c17fb8c + c2c03df commit 101eecc

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/_png.cpp

+6-13
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,23 @@
1010
of harmless warnings.
1111
*/
1212

13-
#include <vector>
14-
15-
#include "numpy_cpp.h"
16-
#include "mplutils.h"
17-
#include "file_compat.h"
1813

1914
extern "C" {
20-
#ifdef __linux__
2115
# include <png.h>
2216
# ifdef _POSIX_C_SOURCE
2317
# undef _POSIX_C_SOURCE
2418
# endif
2519
# ifdef _XOPEN_SOURCE
2620
# undef _XOPEN_SOURCE
2721
# endif
28-
# include "Python.h"
29-
#else
22+
}
3023

31-
/* Python API mandates Python.h is included *first* */
32-
# include "Python.h"
24+
#include "numpy_cpp.h"
25+
#include "mplutils.h"
26+
#include "file_compat.h"
3327

34-
# include <png.h>
35-
#endif
36-
}
28+
# include <vector>
29+
# include "Python.h"
3730

3831

3932
// As reported in [3082058] build _png.so on aix

0 commit comments

Comments
 (0)