Browse Source

Clifford Wolf:


			
			
				rocklinux
			
			
		
Clifford Wolf 17 years ago
parent
commit
5e18f02fe4
4 changed files with 92 additions and 2 deletions
  1. +1
    -1
      package/base/linux/config-500.in
  2. +7
    -1
      package/base/linux/linux.conf
  3. +20
    -0
      package/base/linux/linux26-hdrs/types_blkcnt_t.patch
  4. +64
    -0
      package/base/util-linux/llseek_fixes.patch

+ 1
- 1
package/base/linux/config-500.in

@ -70,7 +70,7 @@ then
;;
esac
choice ROCKCFG_PKG_LINUX_DEFAULT_HEADERS linux-libc \
choice ROCKCFG_PKG_LINUX_DEFAULT_HEADERS linux26 \
linux26 'Use Linux 2.6 headers as system headers' \
linux-libc 'Use linux-libc-headers package as system headers'

+ 7
- 1
package/base/linux/linux.conf

@ -499,7 +499,13 @@ main_lx_headers() {
echo "Installing Linux headers in $root ..."
mkdir -p $builddir/hdr_path
eval $MAKE headers_install INSTALL_HDR_PATH=$builddir/hdr_path
cp -av $builddir/hdr_path/* $root/usr/include/
for x in $confdir/linux26-hdrs/*.patch; do
[ -f $x ] || continue
echo "Applying linux userspace headers patch $x.."
( cd $builddir/hdr_path/include && patch -p1 < $x; )
done
rm -vf $builddir/hdr_path/include/scsi/{sg,scsi,scsi_ioctl}.h
cp -av $builddir/hdr_path/include/* $root/usr/include/
}
autoextract=0

+ 20
- 0
package/base/linux/linux26-hdrs/types_blkcnt_t.patch

@ -0,0 +1,20 @@
--- ./linux/types.h 2007-05-20 23:27:49.000000000 +0200
+++ ./linux/types.h 2007-05-20 23:30:30.000000000 +0200
@@ -121,6 +121,8 @@
* any application/library that wants linux/types.h.
*/
+#if 0 /* CONFLICT WITH GLIBC HEADERS */
+
/*
* The type of the inode's block count.
*/
@@ -130,6 +132,8 @@
typedef unsigned long blkcnt_t;
#endif
+#endif /* CONFLICT WITH GLIBC HEADERS */
+
/*
* The type of an index into the pagecache. Use a #define so asm/types.h
* can override it.

+ 64
- 0
package/base/util-linux/llseek_fixes.patch

@ -0,0 +1,64 @@
--- ./fdisk/llseek.c 2007-05-21 11:45:41.000000000 +0200
+++ ./fdisk/llseek.c 2007-05-21 11:53:14.000000000 +0200
@@ -5,6 +5,7 @@
* under the terms of the GNU Public License.
*/
+#include <sys/syscall.h>
#include <sys/types.h>
#include <errno.h>
@@ -26,27 +27,12 @@
#else
#include <linux/unistd.h> /* for __NR__llseek */
-static int _llseek (unsigned int, unsigned long,
- unsigned long, long long *, unsigned int);
-
-#ifdef __NR__llseek
-
-static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
- unsigned long, offset_low,long long *,result,
- unsigned int, origin)
-
-#else
-
-/* no __NR__llseek on compilation machine - might give it explicitly */
static int _llseek (unsigned int fd, unsigned long oh,
unsigned long ol, long long *result,
unsigned int origin) {
- errno = ENOSYS;
- return -1;
+ return syscall(__NR__llseek, fd, oh, ol, result, origin);
}
-#endif
-
static long long my_llseek (unsigned int fd, long long offset,
unsigned int origin)
{
--- ./fdisk/sfdisk.c 2007-05-21 11:48:48.000000000 +0200
+++ ./fdisk/sfdisk.c 2007-05-21 11:54:32.000000000 +0200
@@ -47,6 +47,7 @@
#include <getopt.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
+#include <sys/syscall.h>
#include <sys/utsname.h>
#include <linux/unistd.h> /* _syscall */
#include "nls.h"
@@ -177,9 +178,11 @@
#endif
#ifndef use_lseek
-static __attribute__used
-_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
- loff_t *, res, unsigned int, wh);
+static int _llseek (unsigned int fd, unsigned long oh,
+ unsigned long ol, long long *result,
+ unsigned int origin) {
+ return syscall(__NR__llseek, fd, oh, ol, result, origin);
+}
#endif
static int

Loading…
Cancel
Save