c++ubuntugccg++

Cannot use errno.h with gcc/g++ after updating ubuntu 10.4


After updating Ubuntu 10.4, I'm not able to build any projects with errno.h used in them. EPERM, EINVAL,... are now "undeclared"

I tried tracking down the problem, and I think it's some messup with the gcc, or with ubuntu packages, because in /usr/include/linux/errno.h:

#ifndef _LINUX_ERRNO_H
#define _LINUX_ERRNO_H

#include <asm/errno.h>


#endif

this 3. line is erroneous. Compiler says "Cannot find include file "

Can anyone help me with this.


Solution

  • On my Ubuntu 10.04 system, /usr/include/asm/errno.h is part of the linux-libc-dev package.

    I suggest you perform a clean reinstall of that package.