Peter S. Mazinger 20 лет назад
Родитель
Сommit
64abfe2b3f
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      libc/misc/sysvipc/shm.c

+ 5 - 3
libc/misc/sysvipc/shm.c

@@ -17,7 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
    Boston, MA 02111-1307, USA.  */
 
 
-/* SHMLBA uses it */
+/* SHMLBA uses it on most of the archs (not mips) */
 #define __getpagesize getpagesize
 #define __getpagesize getpagesize
 
 
 #include <stdlib.h>
 #include <stdlib.h>
@@ -26,8 +26,6 @@
 #include <syscall.h>
 #include <syscall.h>
 #include "ipc.h"
 #include "ipc.h"
 
 
-libc_hidden_proto(getpagesize)
-
 #ifdef L_shmat
 #ifdef L_shmat
 /* Attach the shared memory segment associated with SHMID to the data
 /* Attach the shared memory segment associated with SHMID to the data
    segment of the calling process.  SHMADDR and SHMFLG determine how
    segment of the calling process.  SHMADDR and SHMFLG determine how
@@ -38,6 +36,10 @@ libc_hidden_proto(getpagesize)
 #ifdef __NR_shmat
 #ifdef __NR_shmat
 _syscall3(void *, shmat, int, shmid, const void *,shmaddr, int, shmflg);
 _syscall3(void *, shmat, int, shmid, const void *,shmaddr, int, shmflg);
 #else
 #else
+/* psm: don't remove this, else mips will fail */
+#include <unistd.h>
+libc_hidden_proto(getpagesize)
+
 void * shmat (int shmid, const void *shmaddr, int shmflg)
 void * shmat (int shmid, const void *shmaddr, int shmflg)
 {
 {
     int retval;
     int retval;