1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 09:44:04 +00:00

Fix missing asprintf definition on Haiku

It needs _GNU_SOURCE and is declared in stdio.h as on GNU/Linux,
but I suppose it's not included by the existing includes.
This commit is contained in:
François Revol 2023-08-05 13:18:33 +02:00 committed by Brenden Matthews
parent 2bd267da31
commit 8f403251a8
2 changed files with 10 additions and 0 deletions

View File

@ -122,6 +122,15 @@ if(OS_SOLARIS)
set(conky_libs ${conky_libs} -L/usr/local/lib) set(conky_libs ${conky_libs} -L/usr/local/lib)
endif(OS_SOLARIS) endif(OS_SOLARIS)
if(OS_HAIKU)
# For asprintf
add_definitions(-D_GNU_SOURCE) # Standard definitions
set(
CMAKE_REQUIRED_DEFINITIONS
"${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE"
)
endif(OS_HAIKU)
# Do version stuff # Do version stuff
set(VERSION_MAJOR "1") set(VERSION_MAJOR "1")
set(VERSION_MINOR "19") set(VERSION_MINOR "19")

View File

@ -35,6 +35,7 @@
#include <clocale> #include <clocale>
#include <cstring> #include <cstring>
#include <ctime> #include <ctime>
#include <stdio.h>
#include "conky.h" #include "conky.h"
#include "logging.h" #include "logging.h"
#include "text_object.h" #include "text_object.h"