This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 3040
  sysdeps/unix/sysv/linux/openat.c Last modified: 2006-09-06 14:31:40
     Query page      Enter new bug
Bug#: 3040   Hardware:   Reporter: M. MosG Gor. <mgorohovsky@gmail.com>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: Ulrich Drepper <drepper@redhat.com>   Target Milestone:  
Flags: Requestee:
  backport ()
  examined ()
  testsuite ()
Summary:
Keywords:

Attachment Description Type Created Actions
openat.c.diff A diff for the opeat.c file to fix the compilation. patch 2006-08-14 11:10 Edit | Diff
openat.c.fixed The fixed openat.c file text/plain 2006-08-14 11:11 Edit None
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 3040 depends on: Show dependency tree
Show dependency graph
Bug 3040 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2006-08-14 11:09
Can not compile CVS glibc 20060813 CVS HEAD

sysdeps/unix/sysv/linux/openat.c can not be compiled
with --enable-kernel=2.6.17 configure option:
  ...
../sysdeps/unix/sysv/linux/openat.c: In function '__OPENAT':
../sysdeps/unix/sysv/linux/openat.c:156: error: 'va_start' used in function with
fixed args
  ...

proposed solution: my diff for sysdeps/unix/sysv/linux/openat.c that
compiles and passes tests:

------------ CUT --------------------
--- openat.orig 2006-03-01 07:32:42.000000000 +0200                            
                                             
+++ openat.c.fixed      2006-04-30 19:15:52.000000000 +0300                    
                                             
@@ -27,6 +27,9 @@                                                              
                                             
 #include <sysdep-cancel.h>                                                    
                                             
 #include <not-cancel.h>                                                       
                                             
                                                                               
                                             
+#if !defined OPENAT                                                           
                                             
+# define OPENAT openat                                                        
                                             
+#endif                                                                        
                                             
                                                                               
                                             
 #if !defined OPENAT && !defined __ASSUME_ATFCTS                               
                                             
 # define OPENAT openat                                                        
                                             
@@ -70,11 +73,7 @@ int __have_atfcts;                                          
                                             
                                                                               
                                             
                                                                               
                                             
 int                                                                           
                                             
-OPENAT_NOT_CANCEL (fd, file, oflag, mode)                                     
                                             
-     int fd;                                                                  
                                             
-     const char *file;                                                        
                                             
-     int oflag;                                                               
                                             
-     mode_t mode;                                                             
                                             
+OPENAT_NOT_CANCEL (int fd, const char *file, int oflag, mode_t mode)          
                                             
 {                                                                             
                                             
                                                                               
                                             
   /* We have to add the O_LARGEFILE flag for openat64.  */                    
                                             
@@ -144,10 +143,7 @@ OPENAT_NOT_CANCEL (fd, file, oflag, mode                  
                                             
    the directory associated with FD.  If OFLAG includes O_CREAT, a            
                                             
    third argument is the file protection.  */                                 
                                             
 int                                                                           
                                             
-__OPENAT (fd, file, oflag)                                                    
                                             
-     int fd;                                                                  
                                             
-     const char *file;                                                        
                                             
-     int oflag;                                                               
                                             
+__OPENAT (int fd, const char *file, int oflag, ...)                           
                                             
 {                                                                             
                                             
   mode_t mode = 0;                                                            
                                             
   if (oflag & O_CREAT)                                                        
                                             
---------------------- CUT -------------------------------

CVS 20060814 CVS HEAD still has no other fix for this.

------- Additional Comment #1 From M. MosG Gor. 2006-08-14 11:10 -------
Created an attachment (id=1220)
A diff for the opeat.c file to fix the compilation.

This is a hack. The real fix is needed.

------- Additional Comment #2 From M. MosG Gor. 2006-08-14 11:11 -------
Created an attachment (id=1221)
The fixed openat.c file

The openat.c file after applying the patch.

------- Additional Comment #3 From Ulrich Drepper 2006-08-21 19:44 -------
Fixed with a different patch upstream.

------- Additional Comment #4 From Mike Frysinger 2006-08-26 05:14 -------
*** Bug 2873 has been marked as a duplicate of this bug. ***

------- Additional Comment #5 From Ulrich Drepper 2006-09-06 14:31 -------
*** Bug 3170 has been marked as a duplicate of this bug. ***

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In