[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#320630: libc6-dev: /usr/include/sys/socket.h broken with g++ 4.x



Package: libc6-dev
Version: 2.3.5-2
Severity: normal
Tags: patch

 /usr/include/sys/socket.h has the definitions of SHUT_* in
 a anonymous enum. g++ 4 started enforcing C++ standard part
 which forbids using anonymous enums as template arguments. 

 Please see the thread starting with:

 http://lists.debian.org/debian-devel/2005/07/msg01486.html

 for more discussion about this. So, please just ditch the
 enum and leave #defines.

--- /usr/include/sys/socket.h   2005-07-17 13:10:29.000000000 +0300
+++ socket.h    2005-07-30 21:39:29.000000000 +0300
@@ -46,15 +46,9 @@
 
 /* The following constants should be used for the second parameter of
    `shutdown'.  */
-enum
-{
-  SHUT_RD = 0,         /* No more receptions.  */
 #define SHUT_RD                SHUT_RD
-  SHUT_WR,             /* No more transmissions.  */
 #define SHUT_WR                SHUT_WR
-  SHUT_RDWR            /* No more receptions or transmissions.  */
 #define SHUT_RDWR      SHUT_RDWR
-};
 
 /* This is the type we use for generic socket address arguments.
 

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-rc3
Locale: LANG=fi_FI.UTF-8@euro, LC_CTYPE=fi_FI.UTF-8@euro (charmap=UTF-8)

Versions of packages libc6-dev depends on:
ii  libc6                      2.3.5-2       GNU C Library: Shared libraries an
ii  linux-kernel-headers       2.6.13+0rc3-1 Linux Kernel Headers for developme

Versions of packages libc6-dev recommends:
ii  gcc [c-compiler]              4:4.0.0-2  The GNU C compiler
ii  gcc-3.3 [c-compiler]          1:3.3.6-7  The GNU C compiler
ii  gcc-4.0 [c-compiler]          4.0.1-2    The GNU C compiler

-- no debconf information



Reply to: