]> sigrok.org Git - libserialport.git/commitdiff
linux: Define feature macros to get required functions.
authorMartin Ling <redacted>
Sun, 24 Aug 2014 12:34:33 +0000 (13:34 +0100)
committerMartin Ling <redacted>
Sun, 24 Aug 2014 13:06:21 +0000 (14:06 +0100)
This is needed to build with -std=c99.

libserialport_internal.h

index 962fc20833a61d77c344af61a8f09f53c5efb117..bef84b66f26f061bb4fdd791667d806446fcb3b9 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifdef __linux__
+#define _BSD_SOURCE // for timeradd, timersub, timercmp
+#define _XOPEN_SOURCE 700 // for readlinkat
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>