mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-15 02:56:51 +07:00
switch ifdef __KLIBC__ to ifndef __GLIBC__
This commit is contained in:
parent
eb82b76ded
commit
05ec6e7507
9
Makefile
9
Makefile
@ -33,9 +33,6 @@ USE_GCOV = false
|
||||
# include Security-Enhanced Linux support
|
||||
USE_SELINUX = false
|
||||
|
||||
# comile with klibc instead of glibc
|
||||
USE_KLIBC = false
|
||||
|
||||
# set this to create statically linked binaries
|
||||
USE_STATIC = false
|
||||
|
||||
@ -142,12 +139,6 @@ ifeq ($(strip $(USE_GCOV)),true)
|
||||
LDFLAGS += -fprofile-arcs
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_KLIBC)),true)
|
||||
KLCC = /usr/bin/$(CROSS_COMPILE)klcc
|
||||
CC = $(KLCC)
|
||||
LD = $(KLCC)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_SELINUX)),true)
|
||||
UDEV_OBJS += udev_selinux.o
|
||||
LIB_OBJS += -lselinux -lsepol
|
||||
|
4
README
4
README
@ -69,10 +69,6 @@ Compile Options:
|
||||
USE_SELINUX
|
||||
If set to 'true', udev will be built with SELinux support
|
||||
enabled. This is disabled by default.
|
||||
USE_KLIBC
|
||||
If set to 'true', udev is built and linked against klibc.
|
||||
Default value is 'false'. KLCC specifies the klibc compiler
|
||||
wrapper, usually located at /usr/bin/klcc.
|
||||
EXTRAS
|
||||
list of helper programs in extras/ to build.
|
||||
make EXTRAS="extras/cdrom_id extras/scsi_id extras/volume_id"
|
||||
|
@ -402,8 +402,7 @@ static int set_options(int argc, char **argv, const char *short_opts,
|
||||
/*
|
||||
* optind is a global extern used by getopt. Since we can call
|
||||
* set_options twice (once for command line, and once for config
|
||||
* file) we have to reset this back to 1. [Note glibc handles
|
||||
* setting this to 0, but klibc does not.]
|
||||
* file) we have to reset this back to 1.
|
||||
*/
|
||||
optind = 1;
|
||||
while (1) {
|
||||
|
@ -23,14 +23,6 @@ make clean EXTRAS="$EXTRAS" >/dev/null
|
||||
make all $MAKEOPTS USE_LOG=false EXTRAS="$EXTRAS" || exit
|
||||
echo -e "\n\n"
|
||||
|
||||
# klibc build
|
||||
if [ -n "$KLCC" -a -e "$KLCC" ]; then
|
||||
echo KLCC: "$KLCC"
|
||||
make clean EXTRAS="$EXTRAS" >/dev/null
|
||||
make all -j4 $MAKEOPTS USE_KLIBC=true DEBUG=true EXTRAS="$EXTRAS" KLCC="$KLCC" || exit
|
||||
echo -e "\n\n"
|
||||
fi
|
||||
|
||||
# install in temporary dir and show it
|
||||
TEMPDIR="`pwd`/.tmp"
|
||||
rm -rf $TEMPDIR
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include "udev.h"
|
||||
|
||||
#ifdef __KLIBC__
|
||||
#ifndef __GLIBC__
|
||||
#define __OWN_USERDB_PARSER__
|
||||
#endif
|
||||
|
||||
|
@ -105,7 +105,7 @@ static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
|
||||
}
|
||||
#else
|
||||
/* needed until /usr/include/sys/inotify.h is working */
|
||||
#ifdef __KLIBC__
|
||||
#ifndef __GLIBC__
|
||||
#include <sys/inotify.h>
|
||||
#else
|
||||
static inline int inotify_init(void)
|
||||
@ -117,7 +117,7 @@ static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
|
||||
{
|
||||
return syscall(__NR_inotify_add_watch, fd, name, mask);
|
||||
}
|
||||
#endif /* __KLIBC__ */
|
||||
#endif /* __GLIBC__ */
|
||||
#endif /* __NR_inotify_init */
|
||||
|
||||
#ifndef IN_CREATE
|
||||
|
Loading…
Reference in New Issue
Block a user