Skip to content

Commit 6ee1221

Browse files
committed
c-ext: include sys/types.h before sys/sysctl.h
Closes #128.
1 parent 7123e82 commit 6ee1221

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

c-ext/backend_c.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
#include <Windows.h>
1414
#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
1515
defined(__NetBSD__) || defined(__DragonFly__)
16-
#include <sys/sysctl.h>
1716
#include <sys/types.h>
17+
18+
#include <sys/sysctl.h>
19+
1820
#endif
1921

2022
#include "python-zstandard.h"

docs/news.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ Bug Fixes
8080
---------
8181

8282
* ``setup.py`` no longer attempts to build the C backend on PyPy. (#130)
83+
* ``<sys/types.h>`` is now included before ``<sys/sysctl.h>``. This was
84+
the case in releases prior to 0.15.0 and the include order was reversed
85+
as part of running ``clang-format``. The old/working order has been
86+
restored. (#128)
8387

8488
0.15.0 (released 2020-12-29)
8589
============================

0 commit comments

Comments
 (0)