summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libezxml/ezxml.c2
-rw-r--r--src/libpiano/piano.c2
-rw-r--r--src/libpiano/xml.c2
-rw-r--r--src/libwaitress/waitress.c2
-rw-r--r--src/main.c2
-rw-r--r--src/settings.c2
-rw-r--r--src/terminal.c2
-rw-r--r--src/ui.c2
8 files changed, 16 insertions, 0 deletions
diff --git a/src/libezxml/ezxml.c b/src/libezxml/ezxml.c
index 967d535..e0b5a15 100644
--- a/src/libezxml/ezxml.c
+++ b/src/libezxml/ezxml.c
@@ -22,7 +22,9 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifndef __FreeBSD__
#define _BSD_SOURCE /* required by strdup() */
+#endif
#include <stdlib.h>
#include <stdio.h>
diff --git a/src/libpiano/piano.c b/src/libpiano/piano.c
index 3ed835a..34be389 100644
--- a/src/libpiano/piano.c
+++ b/src/libpiano/piano.c
@@ -21,7 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#ifndef __FreeBSD__
#define _BSD_SOURCE /* required by strdup() */
+#endif
#include <stdio.h>
#include <string.h>
diff --git a/src/libpiano/xml.c b/src/libpiano/xml.c
index b067bc0..6d8e7f9 100644
--- a/src/libpiano/xml.c
+++ b/src/libpiano/xml.c
@@ -21,7 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#ifndef __FreeBSD__
#define _BSD_SOURCE /* required by strdup() */
+#endif
#include <stdio.h>
#include <string.h>
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c
index 8bef2f6..93b60a2 100644
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -21,8 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* required by getaddrinfo() */
#define _BSD_SOURCE /* snprintf() */
+#endif
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/src/main.c b/src/main.c
index ae661c8..094197a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -21,8 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* fileno() */
#define _BSD_SOURCE /* strdup() */
+#endif
/* system includes */
#include <stdlib.h>
diff --git a/src/settings.c b/src/settings.c
index 7b46df3..cae4c8e 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -23,8 +23,10 @@ THE SOFTWARE.
/* application settings */
+#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* PATH_MAX */
#define _BSD_SOURCE /* strdup() */
+#endif
#include <string.h>
#include <stdlib.h>
diff --git a/src/terminal.c b/src/terminal.c
index 666d97b..4808083 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -21,8 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* fileno() */
#define _BSD_SOURCE /* setlinebuf() */
+#endif
#include <termios.h>
#include <stdio.h>
diff --git a/src/ui.c b/src/ui.c
index a025b9c..decb0b6 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -23,8 +23,10 @@ THE SOFTWARE.
/* everything that interacts with the user */
+#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* fileno() */
#define _BSD_SOURCE /* strdup() */
+#endif
#include <stdio.h>
#include <stdarg.h>