Skip to content

Commit ad7ad48

Browse files
committed
More NDK r11c compilation fixes
1 parent 846b1cc commit ad7ad48

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

android/build.sh

+14-8
Original file line numberDiff line numberDiff line change
@@ -1196,14 +1196,17 @@ echo $PKGDIR: $PKGURL
11961196
tar xvzf ../$PKGDIR.tar.gz || exit 1
11971197
cd $PKGDIR
11981198

1199-
echo "SRCS = bright.c clip.c cmuwmrast.c compress.c dither.c faces.c fbm.c \
1199+
echo "SRCS := bright.c clip.c cmuwmrast.c compress.c dither.c faces.c fbm.c \
12001200
fill.c g3.c gif.c halftone.c imagetypes.c img.c mac.c mcidas.c \
12011201
mc_tables.c merge.c misc.c new.c options.c path.c pbm.c pcx.c \
12021202
reduce.c jpeg.c jpeglib.c rle.c rlelib.c root.c rotate.c send.c smooth.c \
12031203
sunraster.c value.c window.c xbitmap.c xli.c \
12041204
xpixmap.c xwd.c zio.c zoom.c ddxli.c doslib.c tga.c bmp.c pcd.c " > Makefile
1205-
echo 'xli: $(SRCS)' >> Makefile
1206-
echo ' $(CC) $(CFLAGS) $(SRCS) -Os -o xli $(LDFLAGS) $(PIE) -lX11 -lxcb -lXau -lXdmcp -landroid_support -lm' >> Makefile
1205+
echo 'OBJS := $(SRCS:%.c=%.o)' >> Makefile
1206+
echo '%.o: %.c' >> Makefile
1207+
echo ' $(CC) $(CFLAGS) $(PIE) $(if $(filter compress.c, $+), -O0) -c $+ -o $@' >> Makefile
1208+
echo 'xli: $(OBJS)' >> Makefile
1209+
echo ' $(CC) $(CFLAGS) $+ -o $@ $(LDFLAGS) $(PIE) -lX11 -lxcb -lXau -lXdmcp -landroid_support -lm' >> Makefile
12071210

12081211
echo '#include <stdarg.h>' > varargs.h
12091212

@@ -1215,7 +1218,8 @@ env CFLAGS="-isystem$BUILDDIR \
12151218
-include math.h \
12161219
-include stdlib.h \
12171220
-include string.h \
1218-
-Drindex=strchr \
1221+
-Dindex=strchr \
1222+
-Drindex=strrchr \
12191223
-isystem . \
12201224
-Os" \
12211225
LDFLAGS="-L$BUILDDIR" \
@@ -1244,7 +1248,8 @@ env CFLAGS="-isystem$BUILDDIR \
12441248
-include math.h \
12451249
-include stdlib.h \
12461250
-include string.h \
1247-
-Drindex=strchr \
1251+
-Dindex=strchr \
1252+
-Drindex=strrchr \
12481253
-isystem . \
12491254
-Os" \
12501255
LDFLAGS="-L$BUILDDIR" \
@@ -1326,10 +1331,11 @@ env CFLAGS=" -DDEBUG \
13261331
-DSO_REUSEADDR=1 \
13271332
-Dipc_perm=debian_ipc_perm \
13281333
-I$BUILDDIR/pixman-0.30.2/pixman \
1329-
-I$BUILDDIR/../../../../../../jni/sdl-1.2/include" \
1330-
LDFLAGS="-L$BUILDDIR" \
1334+
-I$BUILDDIR/../../../../../../jni/sdl-1.2/include \
1335+
-I$BUILDDIR/../../../../../../jni/crypto/include" \
1336+
LDFLAGS="-L$BUILDDIR -L$BUILDDIR/../../../../../../jni/crypto/lib-$TARGET_ARCH" \
13311337
./setCrossEnvironment.sh \
1332-
LIBS="-lfontenc -lfreetype -llog -lSDL -lGLESv1_CM -landroid-shmem" \
1338+
LIBS="-lfontenc -lfreetype -llog -lSDL -lGLESv1_CM -landroid-shmem -lcrypto" \
13331339
../../configure \
13341340
--host=$TARGET_HOST \
13351341
--prefix=$TARGET_DIR/usr \

os/connection.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ InitConnectionLimits(void)
282282
lastfdesc = sysconf(_SC_OPEN_MAX) - 1;
283283
#endif
284284

285-
#ifdef HAS_GETDTABLESIZE
286-
if (lastfdesc < 0)
287-
lastfdesc = getdtablesize() - 1;
288-
#endif
285+
//#ifdef HAS_GETDTABLESIZE
286+
// if (lastfdesc < 0)
287+
// lastfdesc = getdtablesize() - 1;
288+
//#endif
289289

290290
#ifdef _NFILE
291291
if (lastfdesc < 0)

0 commit comments

Comments
 (0)