davee_x

导航

util-linux编译unknown architecture 'BSD_LABELSECTOR' undeclared错误

------------------------------------------------------------------------------
In file included from fdiskbsdlabel.c:62:0:
fdiskbsdlabel.h:61:2: error: #error unknown architecture
fdiskbsdlabel.c: In function 'bselect':
fdiskbsdlabel.c:180:44: error: 'BSD_LABELSECTOR' undeclared (first use in this function)
fdiskbsdlabel.c:180:44: note: each undeclared identifier is reported only once for each function it appears in
fdiskbsdlabel.c: In function 'xbsd_write_bootstrap':
fdiskbsdlabel.c:539:24: error: 'BSD_LABELSECTOR' undeclared (first use in this function)
fdiskbsdlabel.c: In function 'xbsd_readlabel':
fdiskbsdlabel.c:744:28: error: 'BSD_LABELSECTOR' undeclared (first use in this function)
fdiskbsdlabel.c:744:60: error: 'BSD_LABELOFFSET' undeclared (first use in this function)
fdiskbsdlabel.c: In function 'xbsd_writelabel':
fdiskbsdlabel.c:769:32: error: 'BSD_LABELSECTOR' undeclared (first use in this function)
fdiskbsdlabel.c:780:61: error: 'BSD_LABELOFFSET' undeclared (first use in this function)
make[2]: *** [fdisk-fdiskbsdlabel.o] Error 1
------------------------------------------------------------------------------

'BSD_LABELSECTOR' undeclared 错误的原因其实是因为unknown architecture 

所以加入相应architecture 即可。

@@ -46,7 +46,7 @@
 
 #define BSD_LINUX_BOOTDIR "/usr/ucb/mdec"
 
 #if defined (i386) || defined (__sparc__) || defined (__arm__) || \
 #if defined (__i386__) || defined (__sparc__) || defined (__arm__) || \
     defined (__mips__) || defined (__s390__) || defined (__sh__) || \
     defined(__x86_64__) || defined (__avr32__) || defined(__cris__)
 #define BSD_LABELSECTOR   1

 

posted on 2016-08-18 14:16  Wigde.Xiao  阅读(705)  评论(1编辑  收藏  举报