Package: libtexttools
Version: 2.0.5-2
Severity: important
Tags: patch
Justification: fails to build from source


https://bugs.launchpad.net/ubuntu/+source/libtexttools/+bug/503972

[...]
cc -c -g -O2 -g -O2 -D_Bool=char C_code/system.c -o shared-obj/system.o -fPIC
In file included from /usr/include/fcntl.h:205,
                 from C_code/system.c:4:
In function 'open',
    inlined from 'CRunItForStdErr' at C_code/system.c:431:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared 
with attribute error: open with O_CREAT in second argument needs 3 arguments
In function 'open',
    inlined from 'CRunIt' at C_code/system.c:389:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared 
with attribute error: open with O_CREAT in second argument needs 3 arguments
make[1]: *** [shared-obj/system.o] Error 1
Author: Kamal Mostafa <ka...@whence.com>

=== modified file 'C_code/system.c'
--- a/C_code/system.c   2004-03-23 08:05:13 +0000
+++ b/C_code/system.c   2010-01-06 21:17:00 +0000
@@ -386,7 +386,8 @@
          close( i );
      fd0 = open( "/dev/null", O_RDONLY ); 
      if (fd0 < 0 ) exit( 110 );
-     fd1 = open( outfile, O_WRONLY | O_CREAT | O_TRUNC ); 
+     fd1 = open( outfile, O_WRONLY | O_CREAT | O_TRUNC,
+                 S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH );
      if (fd1 < 0 ) exit( 111 );
      fd2 = dup( 1 );
      if (param1[0]=='\0') {
@@ -428,7 +429,8 @@
      if (fd0 < 0 ) exit( 110 );
      fd1 = open( "/dev/null", O_WRONLY );
      if (fd1 < 0 ) exit( 111 );
-     fd2 = open( outfile, O_WRONLY | O_CREAT | O_TRUNC ); 
+     fd2 = open( outfile, O_WRONLY | O_CREAT | O_TRUNC,
+                 S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH );
      if (fd2 < 0 ) exit( 111 );
      if (param1[0]=='\0') {
          execlp( path, path, NULL );

Reply via email to