File checkinstall-glibc_bug.patch of Package checkinstall
--- installwatch-0.7.0beta5/installwatch.c
+++ installwatch-0.7.0beta5/installwatch.c
@@ -2279,12 +2279,12 @@
return result;
}
+#if !defined(__s390_glibc_bug_) && !defined(__powerpc_glibc_bug_)
FILE *fopen(const char *pathname, const char *mode) {
FILE *result;
instw_t instw;
int status=0;
- REFCOUNT;
if (!libc_handle)
initialize();
@@ -2308,6 +2308,7 @@
#endif
if(mode[0]=='w'||mode[0]=='a'||mode[1]=='+') {
+ REFCOUNT;
backup(instw.truepath);
instw_apply(&instw);
log("%d\tfopen\t%s\t#%s\n",(int)result,
@@ -2332,6 +2333,7 @@
return result;
}
+#endif
int ftruncate(int fd, TRUNCATE_T length) {
int result;
@@ -3220,13 +3222,12 @@
return result;
}
+#if !defined(__s390_glibc_bug_) && !defined(__powerpc_glibc_bug_)
FILE *fopen64(const char *pathname, const char *mode) {
FILE *result;
instw_t instw;
int status;
- REFCOUNT;
-
if (!libc_handle)
initialize();
@@ -3249,6 +3250,7 @@
#endif
if(mode[0]=='w'||mode[0]=='a'||mode[1]=='+') {
+ REFCOUNT;
backup(instw.truepath);
instw_apply(&instw);
}
@@ -3271,6 +3273,7 @@
return result;
}
+#endif
int open64(const char *pathname, int flags, ...) {
/* Eventually, there is a third parameter: it's mode_t mode */
--- installwatch-0.7.0beta5/test-installwatch.c
+++ installwatch-0.7.0beta5/test-installwatch.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#define _LARGEFILE64_SOURCE
+
#include <fcntl.h>
#include <stdio.h>
#include <sys/types.h>
@@ -287,7 +289,7 @@
puts("Testing installwatch " VERSION);
puts("Using " TESTFILE " and " TESTFILE2 " as a test files\n");
passed = failed = 0;
- do_test("chmod", test_chmod, 4);
+ do_test("chmod", test_chmod, 3);
do_test("chown", test_chown, 3);
do_test("chroot", test_chroot, 1);
do_test("creat", test_creat, 2);
@@ -296,10 +298,12 @@
#endif
do_test("fchmod", test_fchmod, 3);
do_test("fchown", test_fchown, 3);
+#if !defined(__s390_glibc_bug_) && !defined(__powerpc_glibc_bug_)
do_test("fopen",test_fopen,2);
#if(GLIBC_MINOR >= 1)
do_test("fopen64",test_fopen64,2);
#endif
+#endif
do_test("ftruncate", test_ftruncate, 3);
#if(GLIBC_MINOR >= 1)
do_test("ftruncate64", test_ftruncate64, 3);