- Fix the build failure due to glibc open() check
This commit is contained in:
parent
f7f286d5b0
commit
cfa9a0a2f4
52
sword-open.patch
Normal file
52
sword-open.patch
Normal file
@ -0,0 +1,52 @@
|
||||
--- utilities/cipherraw.cpp 2005-05-02 23:49:04.000000000 -0400
|
||||
+++ utilities/cipherraw.cpp.new 2007-09-25 18:14:16.000000000 -0400
|
||||
@@ -45,13 +45,13 @@
|
||||
|
||||
tmpbuf = new char [ strlen(argv[1]) + 11 ];
|
||||
sprintf(tmpbuf, "%sot.zzz", argv[1]);
|
||||
- ofd[0] = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT);
|
||||
+ ofd[0] = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT, 0600);
|
||||
sprintf(tmpbuf, "%sot.zzz.vss", argv[1]);
|
||||
- oxfd[0] = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT);
|
||||
+ oxfd[0] = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT, 0600);
|
||||
sprintf(tmpbuf, "%snt.zzz", argv[1]);
|
||||
- ofd[1] = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT);
|
||||
+ ofd[1] = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT, 0600);
|
||||
sprintf(tmpbuf, "%snt.zzz.vss", argv[1]);
|
||||
- oxfd[1] = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT);
|
||||
+ oxfd[1] = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT, 0600);
|
||||
|
||||
delete [] tmpbuf;
|
||||
|
||||
--- utilities/gbfidx.cpp 2007-09-25 18:12:44.000000000 -0400
|
||||
+++ utilities/gbfidx.cpp.new 2007-09-25 18:13:04.000000000 -0400
|
||||
@@ -258,25 +258,25 @@
|
||||
#endif // don't need it.
|
||||
char buf[255];
|
||||
|
||||
- if ((fp = open(fname, O_RDONLY|O_BINARY)) == -1) {
|
||||
+ if ((fp = open(fname, O_RDONLY|O_BINARY, 0600)) == -1) {
|
||||
fprintf(stderr, "Couldn't open file: %s\n", fname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sprintf(buf, "%s.vss", fname);
|
||||
- if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
|
||||
+ if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, 0600)) == -1) {
|
||||
fprintf(stderr, "Couldn't open file: %s\n", buf);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sprintf(buf, "%s.cps", fname);
|
||||
- if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
|
||||
+ if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, 0600)) == -1) {
|
||||
fprintf(stderr, "Couldn't open file: %s\n", buf);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sprintf(buf, "%s.bks", fname);
|
||||
- if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
|
||||
+ if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY, 0600)) == -1) {
|
||||
fprintf(stderr, "Couldn't open file: %s\n", buf);
|
||||
exit(1);
|
||||
}
|
@ -1,12 +1,13 @@
|
||||
Name: sword
|
||||
Version: 1.5.9
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Free Bible Software Project
|
||||
|
||||
Group: System Environment/Libraries
|
||||
License: GPLv2
|
||||
URL: http://www.crosswire.org/sword/
|
||||
Source0: http://www.crosswire.org/ftpmirror/pub/sword/source/v1.5/sword-%{version}.tar.gz
|
||||
Patch0: sword-open.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: openssl-devel
|
||||
@ -40,6 +41,7 @@ that uses the sword API, such as Gnomesword or Bibletime.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -p0 -b .open
|
||||
|
||||
%build
|
||||
%configure --disable-static --with-icu --with-lucene
|
||||
@ -82,6 +84,9 @@ rm -rf %buildroot
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 25 2007 Deji Akingunola <dakingun@gmail.com> - 1.5.9-7
|
||||
- Fix the build failure due to glibc open() check
|
||||
|
||||
* Sat Aug 25 2007 Deji Akingunola <dakingun@gmail.com> - 1.5.9-6
|
||||
- Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user