use inotify_* functions which are defined in glibc-header

This commit is contained in:
Than Ngo 2011-05-11 17:08:16 +02:00
parent efaf01f9ae
commit a7044c955f
3 changed files with 38 additions and 19 deletions

View File

@ -0,0 +1,31 @@
diff -up kdelibs-3.5.10/kio/kio/kdirwatch.cpp.flock-redefinition kdelibs-3.5.10/kio/kio/kdirwatch.cpp
--- kdelibs-3.5.10/kio/kio/kdirwatch.cpp.flock-redefinition 2006-07-22 08:16:37.000000000 +0000
+++ kdelibs-3.5.10/kio/kio/kdirwatch.cpp 2011-05-11 14:48:07.000000000 +0000
@@ -67,26 +67,7 @@
#ifdef HAVE_INOTIFY
#include <unistd.h>
#include <fcntl.h>
-#include <sys/syscall.h>
-#include <linux/types.h>
-// Linux kernel headers are documented to not compile
-#define _S390_BITOPS_H
-#include <linux/inotify.h>
-
-static inline int inotify_init (void)
-{
- return syscall (__NR_inotify_init);
-}
-
-static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
-{
- return syscall (__NR_inotify_add_watch, fd, name, mask);
-}
-
-static inline int inotify_rm_watch (int fd, __u32 wd)
-{
- return syscall (__NR_inotify_rm_watch, fd, wd);
-}
+#include <sys/inotify.h>
#ifndef IN_ONLYDIR
#define IN_ONLYDIR 0x01000000

View File

@ -1,15 +0,0 @@
diff -ur kdelibs-3.5.9/kio/kio/kdirwatch.cpp kdelibs-3.5.9-fix-flock-redefinition/kio/kio/kdirwatch.cpp
--- kdelibs-3.5.9/kio/kio/kdirwatch.cpp 2006-07-22 10:16:37.000000000 +0200
+++ kdelibs-3.5.9-fix-flock-redefinition/kio/kio/kdirwatch.cpp 2008-08-23 00:59:17.000000000 +0200
@@ -71,7 +71,11 @@
#include <linux/types.h>
// Linux kernel headers are documented to not compile
#define _S390_BITOPS_H
+#define flock linux_flock
+#define flock64 linux_flock64
#include <linux/inotify.h>
+#undef flock
+#undef flock64
static inline int inotify_init (void)
{

View File

@ -28,7 +28,7 @@
Summary: KDE 3 Libraries
Name: kdelibs3
Version: 3.5.10
Release: 27%{?dist}
Release: 28%{?dist}
License: LGPLv2
Url: http://www.kde.org/
@ -65,8 +65,8 @@ Patch51: kdelibs-3.5.9-cupsserverbin.patch
Patch52: kdelibs-3.5.9-KDE3.patch
# use /usr/libexec/kde4/drkonqi in KCrash (#453243)
Patch53: kdelibs-3.5.9-drkonqi-kde4.patch
# fix build against Rawhide kernel headers (fix flock and flock64 redefinition)
Patch54: kdelibs-3.5.9-fix-flock-redefinition.patch
# use inotify_* functions which are defined in glibc-header
Patch54: kdelibs-3.5.10-inotify.patch
# update the KatePart latex.xml syntax definition to the version from Kile 2.0.3
Patch55: kdelibs-3.5.10-latex-syntax-kile-2.0.3.patch
# fix ftbfs (#631195)
@ -236,7 +236,7 @@ format for easy browsing
%patch51 -p1 -b .cupsserverbin
%patch52 -p1 -b .KDE3
%patch53 -p1 -b .drkonqi-kde4
%patch54 -p1 -b .flock-redefinition
%patch54 -p1 -b .inotify
%patch55 -p1 -b .latex-syntax
%patch56 -p1 -b .qcolor_gcc_ftbfs
@ -583,6 +583,9 @@ touch --no-create %{_datadir}/icons/crystalsvg 2> /dev/null || :
%changelog
* Wed May 11 2011 Than Ngo <than@redhat.com> - 3.5.10-28
- use inotify_* functions which are defined in glibc-header
* Tue Mar 15 2011 Than Ngo <than@redhat.com> - 3.5.10-27
- drop requiresflag hint, which isn't supported in new rpm