]> rtime.felk.cvut.cz Git - sojka/sterm.git/commitdiff
Silence warning about deprecation of _BSD_SOURCE
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 21 Sep 2016 13:38:36 +0000 (15:38 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 21 Sep 2016 13:38:36 +0000 (15:38 +0200)
Adding _DEFAULT_SOURCE and keeping _BSD_SOURCE is recommended in
feature_test_macros(7).

sterm.c

diff --git a/sterm.c b/sterm.c
index 3e1a5736cbd5d58f406d8bb73359a8857ee5ee97..c5fc0aa0d6a5d379412d8e8e90475ff7cb4a4dd6 100644 (file)
--- a/sterm.c
+++ b/sterm.c
@@ -1,7 +1,7 @@
 /*
  * Simple serial terminal
  *
- * Copyright 2014, 2015 Michal Sojka <sojkam1@fel.cvut.cz>
+ * Copyright 2014, 2015, 2016 Michal Sojka <sojkam1@fel.cvut.cz>
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -30,6 +30,7 @@
  */
 
 #define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <unistd.h>