Skip to content

Commit

Permalink
Fix missing asprintf definition on Haiku
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mmuman committed Aug 5, 2023
1 parent f6a5122 commit 2d0d3fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/Conky.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ if(OS_SOLARIS)
set(conky_libs ${conky_libs} -L/usr/local/lib)
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
set(VERSION_MAJOR "1")
set(VERSION_MINOR "19")
Expand Down
1 change: 1 addition & 0 deletions src/timeinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <clocale>
#include <cstring>
#include <ctime>
#include <stdio.h>
#include "conky.h"
#include "logging.h"
#include "text_object.h"
Expand Down

0 comments on commit 2d0d3fd

Please sign in to comment.