簡體   English   中英

找不到uuid_t typedef的unistd.h

[英]Can't find a unistd.h with uuid_t typedef

嘗試在Centos 2.6上構建vSphere Perl SDK。 獲得了除一個以外的所有依賴關系,即UUID-0.05。

問題似乎是uuid.h包含了對uuid_t定義的文件引用unistd.h,但unistd.h沒有這樣的東西。 更糟糕的是,盡管有人描述了該變量的兩個包含文件之間的沖突,但我無法在Internet上找到帶有該定義的unistd.h文件。

有人可以指向這樣的unistd.h文件嗎? 或者,甚至采取更好的方法?

以下是有關原始問題的一些信息:

在適用於uuid.1.6.2的Changelog中:

o將解決方法應用於uuid.h,以避免與可能存在uuid_t(Darwin / MacOSX)或uuid_create / uuid_compare(POSIX)的供應商UUID實現沖突。 [Ralf S. Engelschall]

在uuid.h中:

/* workaround conflicts with system headers */
#define uuid_t       __vendor_uuid_t
#define uuid_create  __vendor_uuid_create
#define uuid_compare __vendor_uuid_compare
#include <sys/types.h>
#include <unistd.h>
#undef  uuid_t
#undef  uuid_create
#undef  uuid_compare

這是原始問題(編譯):

jloiacon@flowviewerprime /home/jloiacon/UUID-0.05 249 >make
cp UUID.pm blib/lib/UUID.pm
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp  -typemap /usr/share/perl5/ExtUtils/typemap  UUID.xs > UUID.xsc && mv UUID.xsc UUID.c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"0.05\" -DXS_VERSION=\"0.05\" -fPIC "-I/usr/lib64/perl5/CORE"   UUID.c
UUID.xs: In function âdo_generateâ:
UUID.xs:13: error: storage size of âuuidâ isnât known
UUID.xs:14: warning: implicit declaration of function âuuid_generateâ
UUID.xs:13: warning: unused variable âuuidâ
UUID.xs: In function âdo_unparseâ:
UUID.xs:20: error: storage size of âuuidâ isnât known
UUID.xs:23: warning: implicit declaration of function âuuid_unparseâ
UUID.xs:20: warning: unused variable âuuidâ
UUID.xs: In function âdo_parseâ:
UUID.xs:29: error: storage size of âuuidâ isnât known
UUID.xs:33: warning: implicit declaration of function âuuid_parseâ
UUID.xs:30: warning: unused variable âstrâ
UUID.xs:29: warning: unused variable âuuidâ
make: *** [UUID.o] Error 1

謝謝

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM