summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/modules.mk4
-rw-r--r--mk/vars.mk2
-rwxr-xr-xpackage/mxml/Makefile4
-rw-r--r--package/pcsc-lite/Makefile2
-rw-r--r--package/perl/files/config.sh.arm.eglibc8
-rw-r--r--package/pulseaudio/Makefile10
-rw-r--r--package/pulseaudio/files/daemon.conf20
-rw-r--r--package/pulseaudio/files/pulseaudio.init12
-rw-r--r--package/pulseaudio/files/pulseaudio.postinst2
-rw-r--r--package/pulseaudio/files/system.pa22
-rw-r--r--package/squeezelite/Makefile9
-rw-r--r--package/squeezelite/files/squeezelite.init26
-rw-r--r--package/squeezelite/files/squeezelite.postinst4
-rwxr-xr-xscripts/find14
-rw-r--r--target/arm/kernel/raspberry-pi3
-rw-r--r--target/linux/config/Config.in.audio4
-rw-r--r--target/linux/kernel.config2
-rw-r--r--target/linux/patches/3.12.6/xargs.patch12
-rw-r--r--toolchain/eglibc/Makefile2
-rw-r--r--toolchain/eglibc/Makefile.inc1
-rw-r--r--toolchain/eglibc/eglibc.config4
-rw-r--r--toolchain/eglibc/patches/eglibc-cross.patch89
22 files changed, 149 insertions, 107 deletions
diff --git a/mk/modules.mk b/mk/modules.mk
index ef4870dd1..d959d7453 100644
--- a/mk/modules.mk
+++ b/mk/modules.mk
@@ -1163,10 +1163,6 @@ $(eval $(call KMOD_template,SND,snd,\
$(MODULES_DIR)/kernel/sound/core/snd-pcm \
,40))
-$(eval $(call KMOD_template,SND_HRTIMER,snd-hrtimer,\
- $(MODULES_DIR)/kernel/sound/core/snd-hrtimer \
-,41))
-
$(eval $(call KMOD_template,SND_RAWMIDI,snd-rawmidi,\
$(MODULES_DIR)/kernel/sound/core/snd-hwdep \
$(MODULES_DIR)/kernel/sound/core/snd-rawmidi \
diff --git a/mk/vars.mk b/mk/vars.mk
index 617316e29..23cc018f0 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -118,7 +118,7 @@ endif
# A nifty macro to make testing gcc features easier (from uClibc project)
check_gcc=$(shell \
- if $(CC_FOR_BUILD) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
+ if $(CC_FOR_BUILD) $(1) -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
then echo "$(1)"; else echo "$(2)"; fi)
CF_FOR_BUILD=$(call check_gcc,-fhonour-copts,)
diff --git a/package/mxml/Makefile b/package/mxml/Makefile
index afba8d1c1..e79299700 100755
--- a/package/mxml/Makefile
+++ b/package/mxml/Makefile
@@ -9,8 +9,8 @@ PKG_RELEASE:= 1
PKG_MD5SUM:= 68977789ae64985dddbd1a1a1652642e
PKG_DESCR:= lightweight XML library
PKG_SECTION:= libs
-PKG_URL:= http://www.minixml.org/
-PKG_SITES:= http://ftp.easysw.com/pub/mxml/2.6/
+PKG_URL:= http://www.msweet.org/projects.php?Z3
+PKG_SITES:= http://www.msweet.org/files/project3/
PKG_LIBNAME:= libmxml
PKG_OPTS:= dev
diff --git a/package/pcsc-lite/Makefile b/package/pcsc-lite/Makefile
index bc54b608b..1dc2bc527 100644
--- a/package/pcsc-lite/Makefile
+++ b/package/pcsc-lite/Makefile
@@ -12,7 +12,7 @@ PKG_SECTION:= crypto
PKG_DEPENDS:= libusb libusb-compat libpthread
PKG_BUILDDEP:= libusb libusb-compat
PKG_URL:= http://pcsclite.alioth.debian.org/
-PKG_SITES:= http://alioth.debian.org/frs/download.php/file/3598/
+PKG_SITES:= http://openadk.org/distfiles/
PKG_OPTS:= dev
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
diff --git a/package/perl/files/config.sh.arm.eglibc b/package/perl/files/config.sh.arm.eglibc
index 0aacd4d3d..d96ced6ea 100644
--- a/package/perl/files/config.sh.arm.eglibc
+++ b/package/perl/files/config.sh.arm.eglibc
@@ -788,12 +788,12 @@ lib_ext='.a'
libc=''
libperl='libperl.a'
libpth='%%LIBDIRS%%'
-libs='-lnsl -ldl -lm -lcrypt -lutil -lc'
+libs='-ldl -lm -lcrypt -lutil -lc'
libsdirs='%%LIBDIRS%%'
-libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so'
+libsfiles=' libdl.so libm.so libcrypt.so libutil.so libc.so'
#libsfound=' /lib/libnsl.so /lib/libdl.so /lib/libm.so /lib/libcrypt.so /lib/libutil.so /usr/lib/libc.so'
libspath='%%LIBDIRS%%'
-libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat'
+libswanted='sfio socket inet nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat'
libswanted_uselargefiles=''
line=''
lint=''
@@ -879,7 +879,7 @@ perl='perl'
perl_patchlevel=''
perl_static_inline='static __inline__'
perladmin='root@openadk.nonet'
-perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc'
+perllibs='-ldl -lm -lcrypt -lutil -lc'
perlpath='/usr/bin/perl'
pg='pg'
phostname='hostname'
diff --git a/package/pulseaudio/Makefile b/package/pulseaudio/Makefile
index 578d382e2..f1cf961e1 100644
--- a/package/pulseaudio/Makefile
+++ b/package/pulseaudio/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= pulseaudio
PKG_VERSION:= 4.0
-PKG_RELEASE:= 4
+PKG_RELEASE:= 5
PKG_MD5SUM:= 591f211db2790a7e4d222f2dc6858db3
PKG_DESCR:= a sound system for POSIX OSes
PKG_SECTION:= multimedia
@@ -46,7 +46,8 @@ CONFIGURE_ARGS+= --disable-systemd \
--disable-hal-compat \
--enable-samplerate \
--enable-alsa \
- --with-speex
+ --with-speex \
+ --with-access-group=audio
pulseaudio-install:
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/etc/pulse
@@ -64,5 +65,10 @@ pulseaudio-install:
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/lib/pulse-$(PKG_VERSION)/modules
$(CP) $(WRKINST)/usr/lib/pulse-$(PKG_VERSION)/modules/*.so \
$(IDIR_PULSEAUDIO)/usr/lib/pulse-$(PKG_VERSION)/modules
+ # pa uses $HOME from root user otherwise
+ mv $(IDIR_PULSEAUDIO)/usr/bin/pacmd $(IDIR_PULSEAUDIO)/usr/bin/pacmd.bin
+ echo "#!/bin/sh" > $(IDIR_PULSEAUDIO)/usr/bin/pacmd
+ echo 'PULSE_RUNTIME_PATH=/var/run/pulse pacmd.bin "$$@"' >> $(IDIR_PULSEAUDIO)/usr/bin/pacmd
+ chmod 755 $(IDIR_PULSEAUDIO)/usr/bin/pacmd
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/pulseaudio/files/daemon.conf b/package/pulseaudio/files/daemon.conf
index cfb58724d..760e5299f 100644
--- a/package/pulseaudio/files/daemon.conf
+++ b/package/pulseaudio/files/daemon.conf
@@ -1,4 +1,4 @@
-daemonize = yes
+daemonize = no
allow-module-loading = no
allow-exit = no
use-pid-file = yes
@@ -8,19 +8,15 @@ fail = yes
system-instance = yes
enable-shm = no
realtime-scheduling = yes
-realtime-priority = 5
+realtime-priority = 9
resample-method = src-sinc-fastest
exit-idle-time = -1
load-default-script-file = yes
default-script-file = /etc/pulse/system.pa
-log-target = syslog
-log-level = error
+log-target = stderr
+log-level = 1
log-time = yes
-; default-sample-format = s16le
-; default-sample-rate = 44100
-; alternate-sample-rate = 48000
-; default-sample-channels = 2
-; default-channel-map = front-left,front-right
-
-; default-fragments = 4
-; default-fragment-size-msec = 25
+default-sample-rate = 44100
+resample-method = src-sinc-fastest
+default-fragments = 10
+default-fragment-size-msec = 10
diff --git a/package/pulseaudio/files/pulseaudio.init b/package/pulseaudio/files/pulseaudio.init
index f928e3fe6..584a42350 100644
--- a/package/pulseaudio/files/pulseaudio.init
+++ b/package/pulseaudio/files/pulseaudio.init
@@ -10,13 +10,17 @@ autostart)
exec sh $0 start
;;
start)
+ # check group membership
+ id pulse | grep audio >/dev/null 2>&1
+ if [ $? -ne 0 ];then
+ echo "pulse user must be in group audio."
+ exit 1
+ fi
if [ ! -d /var/run/pulse ]; then
mkdir -p /var/run/pulse/ && chown -R pulse.pulse /var/run/pulse && chmod 750 /var/run/pulse
fi
- if [ ! -d /var/lib/pulse ]; then
- mkdir -p /var/lib/pulse/.pulse-cookie && chown -R pulse.pulse /var/lib/pulse && chmod 750 /var/lib/pulse
- fi
- /usr/bin/pulseaudio $pulseaudio_flags
+ chown pulse /etc/pulse
+ env PULSE_STATE_PATH=/etc/pulse/state /usr/bin/pulseaudio $pulseaudio_flags
;;
stop)
kill $(pgrep -f /usr/bin/pulseaudio)
diff --git a/package/pulseaudio/files/pulseaudio.postinst b/package/pulseaudio/files/pulseaudio.postinst
index 0ec666ee5..e1ef8dfd1 100644
--- a/package/pulseaudio/files/pulseaudio.postinst
+++ b/package/pulseaudio/files/pulseaudio.postinst
@@ -4,4 +4,4 @@ add_rcconf pulseaudio pulseaudio NO
gid=$(get_next_gid)
add_user pulse $(get_next_uid) $gid /var/run/pulse
add_group pulse $gid
-add_rcconf pulseaudio_flags pulseaudio_flags ""
+add_rcconf pulseaudio_flags pulseaudio_flags "-D --log-target=syslog"
diff --git a/package/pulseaudio/files/system.pa b/package/pulseaudio/files/system.pa
index 035f4a6db..693db412b 100644
--- a/package/pulseaudio/files/system.pa
+++ b/package/pulseaudio/files/system.pa
@@ -22,6 +22,24 @@ load-module module-always-sink
### Enable positioned event sounds
load-module module-position-event-sounds
-load-module module-null-sink sink_name=rtp format=s16be channels=2
-load-module module-rtp-send source=rtp.monitor destination=224.0.0.56
+# pacmd communication
+load-module module-cli-protocol-unix socket=/var/run/pulse/cli
+
+# configure as a rtp sender
+#load-module module-null-sink sink_name=rtp format=s16be channels=2
+#load-module module-rtp-send source=rtp.monitor destination=224.0.0.56
+
+# configure as a rtp receiver and sender
+#load-module module-null-sink sink_name=rtp format=s16be channels=2
+#load-module module-rtp-send source=rtp.monitor destination=224.0.0.56 loop=1
+#load-module module-alsa-sink device=hw:0,0 sink_name=alsa
+#load-module module-rtp-recv sap_address=224.0.0.56 sink=alsa
+
+# configure combine-sink (echo in the same room)
+#load-module module-alsa-sink device=hw:0,0 sink_name=alsa
+#load-module module-combine-sink slaves=rtp,alsa
+
+# configure as a rtp receiver
+load-module module-rtp-recv sap_address=224.0.0.56
+load-module module-alsa-sink device=hw:0,0
diff --git a/package/squeezelite/Makefile b/package/squeezelite/Makefile
index ec06e3d04..f200cfee4 100644
--- a/package/squeezelite/Makefile
+++ b/package/squeezelite/Makefile
@@ -5,16 +5,19 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= squeezelite
PKG_VERSION:= 1.5
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= 7605af4d64291495645f88575a564475
PKG_DESCR:= headless squeezebox emulator
PKG_SECTION:= multimedia
PKG_DEPENDS:= libflac alsa-lib libvorbis libmad
-PKG_DEPENDS+= libpthread librt
-PKG_BUILDDEP:= alsa-lib
+PKG_DEPENDS+= libpthread librt libfaad2
+PKG_BUILDDEP:= alsa-lib libmad flac libvorbis mpg123
+PKG_BUILDDEP+= faad2
PKG_URL:= http://code.google.com/p/squeezelite/
PKG_SITES:= http://openadk.org/distfiles/
+PKG_LIBC_DEPENDS:= eglibc glibc musl
+
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,SQUEEZELITE,squeezelite,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
diff --git a/package/squeezelite/files/squeezelite.init b/package/squeezelite/files/squeezelite.init
new file mode 100644
index 000000000..933b81ab5
--- /dev/null
+++ b/package/squeezelite/files/squeezelite.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#PKG squeezelite
+#INIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${squeezelite:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/bin/squeezelite $squeezelite_flags
+ ;;
+stop)
+ kill $(pgrep -f /usr/bin/squeezelite)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?
diff --git a/package/squeezelite/files/squeezelite.postinst b/package/squeezelite/files/squeezelite.postinst
new file mode 100644
index 000000000..e5d9c91ee
--- /dev/null
+++ b/package/squeezelite/files/squeezelite.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf squeezelite squeezelite NO
+add_rcconf squeezelite_flags squeezelite_flags "-z -a 160:5:0:0 -s 10.0.0.1"
diff --git a/scripts/find b/scripts/find
deleted file mode 100755
index 439ec0b3f..000000000
--- a/scripts/find
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-find=$(which find)
-os=$(uname)
-case $os in
- Darwin)
- /opt/local/libexec/gnubin/find "$@"
- ;;
- *)
- /usr/bin/find "$@"
- ;;
-esac
diff --git a/target/arm/kernel/raspberry-pi b/target/arm/kernel/raspberry-pi
index debb98417..2a1450ca3 100644
--- a/target/arm/kernel/raspberry-pi
+++ b/target/arm/kernel/raspberry-pi
@@ -2,7 +2,7 @@ CONFIG_ARM=y
CONFIG_FIQ=y
CONFIG_ARM_PATCH_PHYS_VIRT=y
CONFIG_KUSER_HELPERS=y
-CONFIG_HIGH_RES_TIMERS=y
+CONFIG_PREEMPT=y
CONFIG_TREE_PREEMPT_RCU=y
CONFIG_PREEMPT_RCU=y
CONFIG_ARCH_BCM2708=y
@@ -10,7 +10,6 @@ CONFIG_MACH_BCM2708=y
CONFIG_BCM2708_GPIO=y
CONFIG_BCM2708_VCMEM=y
CONFIG_BCM2708_DMAER=y
-CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_VFP=y
CONFIG_DTC=y
diff --git a/target/linux/config/Config.in.audio b/target/linux/config/Config.in.audio
index 8c4d7d751..dc2ff100f 100644
--- a/target/linux/config/Config.in.audio
+++ b/target/linux/config/Config.in.audio
@@ -31,9 +31,6 @@ config ADK_KERNEL_SND_MIXER_OSS
config ADK_KERNEL_SND_PCM_OSS
boolean
-config ADK_KERNEL_SND_HRTIMER
- boolean
-
config ADK_KPACKAGE_KMOD_SOUND
tristate
@@ -132,7 +129,6 @@ config ADK_KPACKAGE_KMOD_SND_BCM2835
tristate
select ADK_KPACKAGE_KMOD_SND
select ADK_KERNEL_SND_ARM
- select ADK_KERNEL_SND_HRTIMER
depends on ADK_TARGET_SYSTEM_RASPBERRY_PI
default y if ADK_TARGET_SYSTEM_RASPBERRY_PI
default n
diff --git a/target/linux/kernel.config b/target/linux/kernel.config
index 491b04c92..97237b382 100644
--- a/target/linux/kernel.config
+++ b/target/linux/kernel.config
@@ -13,6 +13,8 @@ CONFIG_XFRM=y
CONFIG_INET=y
CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y
+CONFIG_BLOCK=y
+CONFIG_FILE_LOCKING=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_NLS=y
diff --git a/target/linux/patches/3.12.6/xargs.patch b/target/linux/patches/3.12.6/xargs.patch
new file mode 100644
index 000000000..2c7b3df59
--- /dev/null
+++ b/target/linux/patches/3.12.6/xargs.patch
@@ -0,0 +1,12 @@
+diff -Nur linux-3.12.6.orig/scripts/Makefile.modpost linux-3.12.6/scripts/Makefile.modpost
+--- linux-3.12.6.orig/scripts/Makefile.modpost 2013-12-20 16:51:33.000000000 +0100
++++ linux-3.12.6/scripts/Makefile.modpost 2014-01-25 14:55:33.000000000 +0100
+@@ -60,7 +60,7 @@
+ modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers
+
+ # Step 1), find all modules listed in $(MODVERDIR)/
+-MODLISTCMD := find $(MODVERDIR) -name '*.mod' | xargs -r grep -h '\.ko$$' | sort -u
++MODLISTCMD := find $(MODVERDIR) -name '*.mod' | xargs grep -h '\.ko$$' | sort -u
+ __modules := $(shell $(MODLISTCMD))
+ modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o)))
+
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
index 276b468d4..72dd1b1b7 100644
--- a/toolchain/eglibc/Makefile
+++ b/toolchain/eglibc/Makefile
@@ -28,7 +28,7 @@ EGLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final
$(WRKBUILD)/.headers_configure:
mkdir -p $(EGLIBC_BUILD_DIR_INITIAL)
$(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
- $(EGLIBC_BUILD_DIR_INITIAL)/option-groups.config
+ $(WRKBUILD)/libc/option-groups.config
(cd $(EGLIBC_BUILD_DIR_INITIAL); \
${EGLIBC_ENV} \
CC="${REAL_GNU_TARGET_NAME}-gcc $(ADK_TARGET_ABI_CFLAGS)" \
diff --git a/toolchain/eglibc/Makefile.inc b/toolchain/eglibc/Makefile.inc
index b90983ff1..5c59d9d2e 100644
--- a/toolchain/eglibc/Makefile.inc
+++ b/toolchain/eglibc/Makefile.inc
@@ -15,6 +15,7 @@ EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--disable-nscd \
--with-__thread \
--with-tls \
+ --disable-obsolete-rpc \
--enable-add-ons \
--disable-nls
EGLIBC_ENV:= PATH='${TARGET_PATH}' \
diff --git a/toolchain/eglibc/eglibc.config b/toolchain/eglibc/eglibc.config
index 6c3025f71..f0304ff85 100644
--- a/toolchain/eglibc/eglibc.config
+++ b/toolchain/eglibc/eglibc.config
@@ -31,13 +31,13 @@ OPTION_EGLIBC_LIBM = y
OPTION_EGLIBC_LOCALES = y
OPTION_EGLIBC_LOCALE_CODE = y
OPTION_EGLIBC_MEMUSAGE = y
-OPTION_EGLIBC_NIS = y
+OPTION_EGLIBC_NIS = n
OPTION_EGLIBC_NSSWITCH = y
OPTION_EGLIBC_RCMD = y
OPTION_EGLIBC_RTLD_DEBUG = y
OPTION_EGLIBC_SPAWN = y
OPTION_EGLIBC_STREAMS = y
-OPTION_EGLIBC_SUNRPC = y
+OPTION_EGLIBC_SUNRPC = n
OPTION_EGLIBC_UTMP = y
OPTION_EGLIBC_UTMPX = y
OPTION_EGLIBC_WORDEXP = y
diff --git a/toolchain/eglibc/patches/eglibc-cross.patch b/toolchain/eglibc/patches/eglibc-cross.patch
index 893345f2b..6d74ec327 100644
--- a/toolchain/eglibc/patches/eglibc-cross.patch
+++ b/toolchain/eglibc/patches/eglibc-cross.patch
@@ -1,60 +1,50 @@
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc/types.h eglibc-2.18/libc/sunrpc/rpc/types.h
--- eglibc-2.18.orig/libc/sunrpc/rpc/types.h 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc/types.h 2013-09-13 10:49:06.000000000 +0200
-@@ -69,19 +69,25 @@
- #include <sys/types.h>
++++ eglibc-2.18/libc/sunrpc/rpc/types.h 2014-01-25 13:23:20.000000000 +0100
+@@ -70,6 +70,7 @@
#endif
--#ifndef __u_char_defined
--typedef __u_char u_char;
--typedef __u_short u_short;
--typedef __u_int u_int;
--typedef __u_long u_long;
--typedef __quad_t quad_t;
--typedef __u_quad_t u_quad_t;
--typedef __fsid_t fsid_t;
--# define __u_char_defined
-+typedef unsigned char u_char;
-+typedef unsigned short u_short;
-+typedef unsigned int u_int;
-+typedef unsigned long u_long;
-+#if __WORDSIZE == 64
-+typedef long int quad_t;
-+typedef unsigned long int u_quad_t;
-+#elif defined __GLIBC_HAVE_LONG_LONG
-+typedef long long int quad_t;
-+typedef unsigned long long int u_quad_t;
-+#endif
-+#if defined(_CROSS_RPCGEN_)
-+typedef u_quad_t fsid_t;
+ #ifndef __u_char_defined
++#if !defined(__APPLE__) && !defined(__BSD__)
+ typedef __u_char u_char;
+ typedef __u_short u_short;
+ typedef __u_int u_int;
+@@ -79,11 +80,14 @@
+ typedef __fsid_t fsid_t;
+ # define __u_char_defined
#endif
--#ifndef __daddr_t_defined
--typedef __daddr_t daddr_t;
--typedef __caddr_t caddr_t;
-+
-+# define __u_char_defined
-+#if !defined(__daddr_t_defined) && defined(linux)
-+typedef long int daddr_t;
-+typedef char *caddr_t;
++#endif
+ #ifndef __daddr_t_defined
++#if !defined(__APPLE__) && !defined(__BSD__)
+ typedef __daddr_t daddr_t;
+ typedef __caddr_t caddr_t;
# define __daddr_t_defined
#endif
++#endif
+ #include <sys/time.h>
+ #include <sys/param.h>
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_main.c eglibc-2.18/libc/sunrpc/rpc_main.c
--- eglibc-2.18.orig/libc/sunrpc/rpc_main.c 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc_main.c 2013-09-13 10:49:34.000000000 +0200
-@@ -38,7 +38,11 @@
++++ eglibc-2.18/libc/sunrpc/rpc_main.c 2014-01-25 09:57:31.000000000 +0100
+@@ -38,7 +38,6 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-+#ifdef _CROSS_RPCGEN_
-+#define gettext(X) (X)
-+#else
- #include <libintl.h>
-+#endif
+-#include <libintl.h>
#include <locale.h>
#include <ctype.h>
#include <sys/types.h>
-@@ -958,10 +962,12 @@
+@@ -51,6 +50,8 @@
+ #include "rpc_scan.h"
+ #include "proto.h"
+
++#define gettext(X) (X)
++
+ #include "../version.h"
+ #define PACKAGE _libc_intl_domainname
+
+@@ -958,10 +959,12 @@
abort ();
temp = rindex (cmd->infile, '.');
cp = stpcpy (mkfilename, "Makefile.");
@@ -72,16 +62,19 @@ diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_main.c eglibc-2.18/libc/sunrpc/rpc_ma
else
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_scan.c eglibc-2.18/libc/sunrpc/rpc_scan.c
--- eglibc-2.18.orig/libc/sunrpc/rpc_scan.c 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc_scan.c 2013-09-13 10:49:06.000000000 +0200
-@@ -37,7 +37,11 @@
++++ eglibc-2.18/libc/sunrpc/rpc_scan.c 2014-01-25 09:57:31.000000000 +0100
+@@ -37,12 +37,13 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
-+#ifdef _CROSS_RPCGEN_
-+#define gettext(X) (X)
-+#else
- #include <libintl.h>
-+#endif
+-#include <libintl.h>
#include "rpc_scan.h"
#include "rpc_parse.h"
#include "rpc_util.h"
+ #include "proto.h"
+
++#define gettext(X) (X)
++
+ #define startcomment(where) (where[0] == '/' && where[1] == '*')
+ #define endcomment(where) (where[-1] == '*' && where[0] == '/')
+