Index: /trunk/source/level-1/linux-files.lisp
===================================================================
--- /trunk/source/level-1/linux-files.lisp	(revision 15011)
+++ /trunk/source/level-1/linux-files.lisp	(revision 15012)
@@ -977,10 +977,10 @@
         
 (defun %probe-shared-library (shlib)
-  #-(or windows-target freebsd-target)
+  #-(or windows-target android-target freebsd-target)
   (with-cstrs ((name (shlib.pathname shlib)))
     (not (%null-ptr-p (#_dlopen name (logior #$RTLD_NOW #$RTLD_NOLOAD)))))
   ;; FreeBSD may support #$RTLD_NOLOAD in 8.0, and that support may
   ;; have been backported to 7.2.  Until then ...
-  #+freebsd-target                      
+  #+(or freebsd-target android-target)
   (rlet ((info #>Dl_info))
     (not (eql 0 (#_dladdr (shlib.base shlib) info))))
Index: /trunk/source/lisp-kernel/androidarm/Makefile
===================================================================
--- /trunk/source/lisp-kernel/androidarm/Makefile	(revision 15011)
+++ /trunk/source/lisp-kernel/androidarm/Makefile	(revision 15012)
@@ -15,7 +15,7 @@
 
 LIBBASE = 0x04001000
-NDK = /usr/local/android-ndk-r5
+NDK = /usr/local/android-ndk-r6b
 HOST = darwin-x86
-ANDROIDVERSION = android-8
+ANDROIDVERSION = android-9
 SYSROOT = $(NDK)/platforms/$(ANDROIDVERSION)/arch-arm
 NDKLIB = $(SYSROOT)/usr/lib
@@ -94,5 +94,5 @@
 
 ../../aarmcl.so:	$(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) ./armandroid.x ./fixlib
-	$(LD) --shared -Bdynamic -dynamic-linker /system/bin/linker -nostdlib -z nocopyreloc  -o ../../aarmcl.so  -L $(NDKLIB) pad.o arm-spentry.o  pmcl-kernel.o gc-common.o arm-gc.o bits.o arm-exceptions.o image.o thread_manager.o lisp-debug.o memory.o unix-calls.o arm-asmutils.o imports.o lispdcmd.o plprint.o plsym.o albt.o arm_print.o $(OSLIBS) -T ./armandroid.x -M
+	$(LD) --shared -Bdynamic -dynamic-linker /system/bin/linker -nostdlib -z nocopyreloc  -o ../../aarmcl.so  -L $(NDKLIB) pad.o arm-spentry.o  pmcl-kernel.o gc-common.o arm-gc.o bits.o arm-exceptions.o image.o thread_manager.o lisp-debug.o memory.o unix-calls.o arm-asmutils.o imports.o lispdcmd.o plprint.o plsym.o albt.o arm_print.o $(OSLIBS) -T ./armandroid.x
 	./fixlib $(LIBBASE) >> ../../aarmcl.so
 
Index: /trunk/source/lisp-kernel/pmcl-kernel.c
===================================================================
--- /trunk/source/lisp-kernel/pmcl-kernel.c	(revision 15011)
+++ /trunk/source/lisp-kernel/pmcl-kernel.c	(revision 15012)
@@ -1571,31 +1571,27 @@
 */
   FILE *f = fopen("/proc/cpuinfo", "r");
-  char *procline = NULL, *cpuline = NULL, **lineptr, *line = NULL;
+  char *procline = NULL, *cpuline = NULL, line[129], *workline;
   size_t n;
-  ssize_t result;
 
   if (f) {
     while (1) {
-      n = 0;
-      line = NULL;
-      lineptr = &line;
-      result = getline(lineptr, &n, f);
-      if (result < 0) {
+      if (fgets(line,128,f)==NULL) {
         break;
       }
-      line = *lineptr;
+      n = strlen(line);
       if (strncmp(line,"Processor",sizeof("Processor")-1) == 0) {
-        procline = line;
+        procline = malloc(n+1);
+        strcpy(procline,line);
+        procline[n]='\0';
       } else if (strncmp(line, "CPU architecture",sizeof("CPU architecture")-1) == 0) {
-        cpuline = line;
-      } else {
-        free(line);
+        cpuline = malloc(n+1);
+        strcpy(cpuline,line);
+        cpuline[n] = '\0';
       }
     }
-    line = NULL;
     if (cpuline) {
-      line = index(cpuline,':');
-      if (line) {
-        n = strtol(line+1,lineptr,0);
+      workline = index(cpuline,':');
+      if (workline) {
+        n = strtol(workline+1,NULL,0);
         if (n >= 7) {
           if (n == 7) {
