$(OPTFLAGS) $(REQFLAGS) \
-D__KLIBC__ -fno-builtin-printf \
-I$(KLIBC_FIXUPS_DIR) \
- -include $(KLIBC_FIXUPS_DIR)/klibc_fixups.h \
-I$(INCLUDE_DIR) \
-I$(INCLUDE_DIR)/arch/$(ARCH) \
-I$(INCLUDE_DIR)/bits$(BITSIZE) \
LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs
HEADERS += \
- klibc_fixups/klibc_fixups.h \
klibc_fixups/pwd.h
KLIBC_FIXUP_OBJS = \
+++ /dev/null
-#ifdef __KLIBC__
-
-#ifndef _KLIBC_FIXUPS_H
-#define _KLIBC_FIXUPS_H
-
-#define _KLIBC_HAS_ARCH_SIG_ATOMIC_T
-#include <unistd.h>
-
-#define _SC_PAGESIZE 0x66
-static inline long int sysconf(int name)
-{
- if (name == _SC_PAGESIZE)
- return getpagesize();
-
- return -1;
-}
-
-struct exit_status {
- short int e_termination; /* process termination status */
- short int e_exit; /* process exit status */
-};
-
-#endif /* KLIBC_FIXUPS_H */
-#endif /* __KLIBC__ */
errno = EACCES;
return -1;
}
- pgsize = sysconf(_SC_PAGESIZE);
+ pgsize = getpagesize();
fbuf = (char *)calloc(1, pgsize+1);
if (!fbuf) {
dprintf("calloc failed\n");