Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

<sys/stat.h> doesn't define stat struct



I don't know if this question belongs here, but I thought I would give it a shot. I am trying to write a c program.

I include <sys/stat.h> in my .c file because I need to use the 'stat' struct for file information. However, the compiler says that "undefined type, found 'stat'". I know that it is including the file because the "_SYS_STAT_H_" gets defined from it, however I can't determine why it is not also defining the structure.

The compiler doesn't like the line:

stat *fileInfo = NULL;

this is when it says that 'stat' is an undefined type.

Any suggestions?

-- Ryan




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.