From: Daniel Elstner Date: Sun, 13 Sep 2015 18:12:12 +0000 (+0200) Subject: classes.cpp: Define _XOPEN_SOURCE for isascii() X-Git-Tag: libsigrok-0.4.0~299 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=000f504f246f713a86d653e0d6ee6c98a07e74fd;hp=56c8705e37314dafe35b680d2254b6f844e0ecc2;p=libsigrok.git classes.cpp: Define _XOPEN_SOURCE for isascii() The GNU libstdc++ headers use isascii(), which is not part of any POSIX standard. On BSD, this breaks the build. It is however part of XOPEN, which on Linux is apparently enabled implicitly for C++. This should fix #649. --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 324da042..61fb0f7d 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -17,6 +17,11 @@ * along with this program. If not, see . */ +/* Needed for isascii(), as used in the GNU libstdc++ headers */ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 +#endif + #include #include