ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 9291] New: gluster_entry_types enum redefines system macro

Date: Sat, 19 Oct 2013 06:50:27 +0000
Bug ID 9291
Summary gluster_entry_types enum redefines system macros
Classification Unclassified
Product Wireshark
Version 1.10.2
Hardware x86
OS Mac OS X 10.7
Status UNCONFIRMED
Severity Major
Priority Low
Component Extras
Assignee [email protected]
Reporter [email protected]

Build Information:
Mac OS X 10.7.5 with the latest Command Line Tools
--
The gluster_entry_types enum contains values which are already defined as
macros in /usr/include/sys/dirent.h. This causes the build to fail.

>From packet-gluster.h:

enum gluster_entry_types {
    DT_UNKNOWN = 0,
    DT_FIFO = 1,
    DT_CHR = 2,
    DT_DIR = 4,
    DT_BLK = 6,
    DT_REG = 8,
    DT_LNK = 10,
    DT_SOCK = 12,
    DT_WHT = 14
};

>From dirent.h:

/*
 * File types
 */
#define    DT_UNKNOWN     0
#define    DT_FIFO         1
#define    DT_CHR         2
#define    DT_DIR         4
#define    DT_BLK         6
#define    DT_REG         8
#define    DT_LNK        10
#define    DT_SOCK        12
#define    DT_WHT        14

Sample build error from clang:

In file included from packet-glusterfs.c:44:
In file included from packet-gluster_pmap.c:43:
./packet-gluster.h:359:2: error: expected '}'
./packet-gluster.h:359:2: error: expected '}'
        DT_UNKNOWN = 0,
        ^
/usr/include/sys/dirent.h:126:21: note: expanded from macro 'DT_UNKNOWN'
#define DT_UNKNOWN       0
                         ^
./packet-gluster.h:358:26: note: to match this '{'
enum gluster_entry_types {
                         ^

The macros are present in dirent.h at least as far back as 10.4.11.


You are receiving this mail because:
  • You are watching all bug changes.