This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/23404] New: [mips] sys/ioctl.h must be included before sys/socket.h


https://sourceware.org/bugzilla/show_bug.cgi?id=23404

            Bug ID: 23404
           Summary: [mips] sys/ioctl.h must be included before
                    sys/socket.h
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: syq at debian dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

This problem is caused by:
https://sourceware.org/bugzilla/show_bug.cgi?id=21267



1. /usr/include/mips64el-linux-gnuabi64/sys/socket.h
      Includes 
          bits/socket.h
2. In bits/socket.h, it detect IOC_IN is not defined, and define 
         __SYS_SOCKET_H_undef_IOC_IN
    First, and then 
       #include <asm/socket.h>.  // it will include asm/sockios.h, then
asm-generic/ioctl.h
    Then, undef IOC_IN if __SYS_SOCKET_H_undef_IOC_IN

3. We include, sys/ioctl.h, since the FLAG of __ASM_IOCTL_H is defined in step
2,
    So nearly nothing happens here


So, IOC_IN is not defined.

If we don’t include ioctl.h in asm/sockios.h, just like other platforms, it
works then.


It seems that IOC_IN etc are only defined in asm-generic/ioctl.h,
so why namespace conflict?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]