Support FreeBSD in the default configuration

FreeBSD support is basically just very small changes related to
some different includes and one define to not hide non-standard defines
like B115200.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
This commit is contained in:
Arne Schwabe
2024-09-12 13:43:38 +02:00
committed by Erik Ekman
parent 3cae475d63
commit c06cc7655d
3 changed files with 8 additions and 1 deletions

View File

@@ -1,7 +1,10 @@
/* Author: Magnus Ivarsson <magnus.ivarsson@volvo.com> */
/* to get rid of implicit function declarations */
#ifndef __FreeBSD__
/* defining this on FreeBSD hides non-standard defines that sio.c depends on */
#define _XOPEN_SOURCE 600
#endif
#define _GNU_SOURCE
/* build with Darwin C extensions not part of POSIX, i.e. FASYNC, SIGIO.
@@ -37,6 +40,8 @@
#include <stdio.h>
#if defined(LWIP_UNIX_OPENBSD) || defined(LWIP_UNIX_MACH)
#include <util.h>
#elif defined(LWIP_UNIX_FREEBSD)
#include <libutil.h>
#endif
#include <termios.h>
#include <stdio.h>