Browse Source

package/gesftpserver: fix build with gcc 4.8

Fix the following build failure with gcc 4.8 raised since bump to
version 2 in commit 026265bf7e09e0348aefa79e7a1f32add925f23b and
https://github.com/ewxrjk/sftpserver/commit/dbbf0d45425a72a790d25b889ca2cfa909aaaadf:

In file included from alloc.c:25:0:
utils.h:204:48: error: expected ';', ',' or ')' before 'dest'
 static inline void *sftp_memcpy(void *restrict dest, const void *restrict src,
                                                ^

Fixes:
 - http://autobuild.buildroot.org/results/2795213c07c4a961cee0ae7a4e7cccb8bcd6f68e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Fabrice Fontaine 2 years ago
parent
commit
85a9a3f0e6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      package/gesftpserver/gesftpserver.mk

+ 3 - 1
package/gesftpserver/gesftpserver.mk

@@ -16,7 +16,9 @@ GESFTPSERVER_CPE_ID_VENDOR = green_end
 GESFTPSERVER_CPE_ID_PRODUCT = sftpserver
 
 # forgets to link against pthread when cross compiling
-GESFTPSERVER_CONF_ENV = LIBS=-lpthread
+GESFTPSERVER_CONF_ENV = \
+	CFLAGS="$(TARGET_CFLAGS) -std=c99" \
+	LIBS=-lpthread
 
 # overwrite openssh version if enabled
 GESFTPSERVER_DEPENDENCIES += \