これは私がLinuxでコンパイルしているコードです:
#include <net/if.h>
int main() {
struct ifreq ifr;
}
gcc test.c
結構です。
gcc -std=gnu99 test.c
結構です。
gcc -std=c99 test.c
次のエラーで失敗します:
test.c: In function ‘main’:
test.c:4:16: error: storage size of ‘ifr’ isn’t known
struct ifreq
Linuxでの定義が気に入らないC99の違いは何ですか?