Skip to content

Commit 3b3466c

Browse files
authored
Merge pull request #1941 from cschuber/freebsd
Fix build on FreeBSD.
2 parents a0fd918 + 9feb5df commit 3b3466c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ if (MSVC)
516516
endif()
517517

518518
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
519-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -W -Wall -Wnonnull -Wshadow -Wformat -Wundef -Wno-unused-parameter -Wmissing-prototypes -Wno-unknown-pragmas -D_GNU_SOURCE -std=c99")
519+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -W -Wall -Wnonnull -Wshadow -Wformat -Wundef -Wno-unused-parameter -Wmissing-prototypes -Wno-unknown-pragmas -Wno-int-conversion -D_GNU_SOURCE -std=c99")
520520
endif()
521521
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
522522
add_link_options(-lkvm -lm -lprocstat)

src/common/memusage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#include "memusage.h"
5757
#include "bfind.h"
5858

59-
#if defined(OS_LINUX)
59+
#if defined(OS_LINUX) || defined(__FreeBSD__) || defined(OS_SOLARIS)
6060
static int read_common_sizet(void *szp, char *strval)
6161
{
6262
char *end;

0 commit comments

Comments
 (0)