Skip to content

Commit 8bfae27

Browse files
committed
fix the swab bug to compile on solaris system
Signed-off-by: Frank Yu <flyxiaoyu@gmail.com>
1 parent 8664865 commit 8bfae27

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/mplutils.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ typedef unsigned __int8 uint8_t;
1818
# undef _XOPEN_SOURCE
1919
#endif
2020

21+
// Prevent multiple conflicting definitions of swab from stdlib.h and unistd.h
2122
#if defined(__sun) || defined(sun)
2223
#if defined(_XPG4)
2324
#undef _XPG4
2425
#endif
26+
#if defined(_XPG3)
27+
#undef _XPG3
28+
#endif
2529
#endif
2630

2731
#include <Python.h>

src/numpy_cpp.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@
2525
# undef _XOPEN_SOURCE
2626
#endif
2727

28+
// Prevent multiple conflicting definitions of swab from stdlib.h and unistd.h
2829
#if defined(__sun) || defined(sun)
2930
#if defined(_XPG4)
3031
#undef _XPG4
3132
#endif
33+
#if defined(_XPG3)
34+
#undef _XPG3
35+
#endif
3236
#endif
3337

3438
#include <Python.h>

0 commit comments

Comments
 (0)