Skip to content

Commit

Permalink
Compile with std=c11 and set appropriate glibc feature test macros
Browse files Browse the repository at this point in the history
might resolve #333 and #348
  • Loading branch information
derf committed Dec 7, 2017
1 parent 402db00 commit c59aafb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ scalable_icon_dir = ${icon_dir}/scalable/apps
CFLAGS ?= -g -O2
CFLAGS += -Wall -Wextra -pedantic

# Settings for glibc >= 2.19 - may need to be adjusted for other systems
CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500

ifeq (${curl},1)
CFLAGS += -DHAVE_LIBCURL
LDLIBS += -lcurl
Expand Down
1 change: 1 addition & 0 deletions src/gib_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "gib_hash.h"
#include "utils.h"
#include "debug.h"
#include <strings.h>

gib_hash_node *gib_hash_node_new(char *key, void *data)
{
Expand Down
1 change: 1 addition & 0 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "feh.h"
#include "filelist.h"
#include "options.h"
#include <strings.h>

static void check_options(void);
static void feh_getopt_theme(int argc, char **argv);
Expand Down

0 comments on commit c59aafb

Please sign in to comment.