소스 검색

LibC: Move getpagesize() out-of-line

This being inline somehow broke the binutils autoconf scripts. It used
to work, so I suspect that some other change to LibC has caused those
autoconf scripts to go down a new path.

Regardless, this seems perfectly sensible.
Andreas Kling 5 년 전
부모
커밋
308d3b764f
2개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 0
      Libraries/LibC/unistd.cpp
  2. 1 1
      Libraries/LibC/unistd.h

+ 6 - 0
Libraries/LibC/unistd.cpp

@@ -745,4 +745,10 @@ long sysconf(int name)
     int rc = syscall(SC_sysconf, name);
     __RETURN_WITH_ERRNO(rc, rc, -1);
 }
+
+int getpagesize()
+{
+    return PAGE_SIZE;
+}
+
 }

+ 1 - 1
Libraries/LibC/unistd.h

@@ -62,7 +62,7 @@ void sysbeep();
 int gettid();
 int donate(int tid);
 int set_process_icon(int icon_id);
-inline int getpagesize() { return 4096; }
+int getpagesize();
 pid_t fork();
 int execv(const char* path, char* const argv[]);
 int execve(const char* filename, char* const argv[], char* const envp[]);