Skip to content

Commit

Permalink
Fix BSD build, adding missing linker flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Jun 3, 2018
1 parent af3f323 commit f244d10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config.lib
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,9 @@ make_cflags_and_ldflags() {
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
CFLAGS="$CFLAGS -DUNIX"
fi
if [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ]; then
LIBS="$LIBS -lintl"
fi
# And others like Windows
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
CFLAGS="$CFLAGS -DWIN"
Expand Down
2 changes: 1 addition & 1 deletion src/os/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

#if !defined(__MINGW32__) && defined(__GNUC__) && !defined(snprintf)
/* (v)snprintf is in fact C99, but we like to use it over (v)sprintf for the obvious reasons */
#if !defined(__APPLE__) && !defined(TOS) && !defined(__FreeBSD__) && !defined(__DJGPP__)
#if !defined(__APPLE__) && !defined(TOS) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DJGPP__)
extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, va_list __arg) __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
#endif /* __APPLE__ */
Expand Down

0 comments on commit f244d10

Please sign in to comment.