error: 'uint32_t' does not name a type

Description

Under Mac OS X, I get a bunch of these errors. I have not tried a lesser version of gcc.

MacBook-Pro:fix8-master idf$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc48/4.8.2/libexec/gcc/x86_64-apple-darwin12.5.0/4.8.2/lto-wrapper
Target: x86_64-apple-darwin12.5.0
Configured with: ../configure --build=x86_64-apple-darwin12.5.0 --prefix=/usr/local/Cellar/gcc48/4.8.2 --enable-languages=c,c+,fortran,java,objc,obj-c+ --program-suffix=-4.8 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-cloog=/usr/local/opt/cloog018 --with-isl=/usr/local/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --enable-plugin --disable-nls --with-ecj-jar=/usr/local/opt/ecj/share/java/ecj.jar --disable-multilib
Thread model: posix
gcc version 4.8.2 (GCC)

Environment

Mac OS X, gcc 4.8.2

Activity

Show:
David Dight
January 3, 2014, 9:58 PM

Looking a little closer at this issue. The error is actually being reported from inside a system include.

Now in LInux, this file explicitly includes stdint.h

Can you check the file in OSX? It might be we need to have an explicit include for OSX.

ivan figueredo
January 3, 2014, 10:00 PM
Edited

OS X 10.8.5
Can you check /usr/include/netinet/in.h and see if stdint.h is included

ivan figueredo
January 6, 2014, 5:35 PM
  • @(#)in.h 8.3 (Berkeley) 1/3/94

  • $FreeBSD: src/sys/netinet/in.h,v 1.48.2.2 2001/04/21 14:53:06 ume Exp $
    */

#ifndef NETINET_IN_H
#define NETINET_IN_H
#include <sys/appleapiopts.h>
#include <sys/_types.h>
#include <stdint.h> /* uint(8|16|32)_t */

#include <Availability.h>

#ifndef _IN_ADDR_T
#define _IN_ADDR_T
typedef __uint32_t in_addr_t; /* base type for internet address */
#endif

#ifndef _IN_PORT_T
#define _IN_PORT_T
typedef __uint16_t in_port_t;
#endif

David Dight
January 7, 2014, 5:07 AM

I'm puzzled by this. What is the actual line in /usr/include/netinet/in.h that the compiler is complaining about?

David Dight
January 14, 2014, 1:14 AM

Have been unable to reproduce. Please reopen if you have more information about your environment.

Assignee

David Dight

Reporter

ivan figueredo

Labels

None

Branch

master

Products

None

Components

Fix versions

Affects versions

Priority

Critical
Configure