fixed linux build
authorEdouard Tisserant
Mon, 23 Feb 2015 17:20:40 +0100
changeset 70c0382670c294
parent 69 c119ffc3065f
child 72 07265a6367ff
fixed linux build
src/Makefile
src/mime.c
     1.1 --- a/src/Makefile	Mon Feb 23 16:10:22 2015 +0100
     1.2 +++ b/src/Makefile	Mon Feb 23 17:20:40 2015 +0100
     1.3 @@ -24,9 +24,10 @@
     1.4  TARGET=libpEpEngine.so
     1.5  GPGME_IN=$(HOME)
     1.6  LIBGPGME=libgpgme.so.11
     1.7 -CC?=gcc -std=c99
     1.8 +CC=gcc -std=c99
     1.9  CFLAGS?=-I$(GPGME_IN)/include $(OPTIMIZE) -fPIC -pedantic \
    1.10 -	-DSYSTEM_DB=\"$(SYSTEM_DB)\" -DLIBGPGME=\"$(LIBGPGME)\" -DSQLITE_THREADSAFE=1
    1.11 +	-DSYSTEM_DB=\"$(SYSTEM_DB)\" -DLIBGPGME=\"$(LIBGPGME)\" \
    1.12 +	-DSQLITE_THREADSAFE=1 -D_GNU_SOURCE
    1.13  LDFLAGS?=-L$(GPGME_IN) -shared -lc -ldl -letpan -lgpgme-pthread -lsqlite3
    1.14  
    1.15  else
     2.1 --- a/src/mime.c	Mon Feb 23 16:10:22 2015 +0100
     2.2 +++ b/src/mime.c	Mon Feb 23 17:20:40 2015 +0100
     2.3 @@ -167,7 +167,7 @@
     2.4      if (len == -1 && errno == EOVERFLOW)
     2.5          goto err_file;
     2.6  
     2.7 -    if (len + 1 > SIZE_T_MAX)
     2.8 +    if (len + 1 > SIZE_MAX)
     2.9          goto err_buffer;
    2.10  
    2.11      size = (size_t) len;