c语言 - 找不到带有 uuid_t typedef 的 unistd.h



尝试在Centos 2.6上构建vSphere Perl SDK。得到了除了一个UUID-0.05之外的所有依赖项。

问题似乎是uuid.h包含了定义uuid_t的文件引用unistd.h,但unistd.h没有这样的东西。更糟糕的是,尽管有些人描述了变量的两个include文件之间的冲突,但我在互联网上找不到具有该定义的unistd.h文件。

有人能指出这样一个unistd.h文件吗?或者,甚至是一种更好的方法?

以下是关于原始问题的一些信息:

在uuid1.6.2:的变更日志中

o对uuid.h应用变通方法以避免与供应商UUID实现,其中UUID_t(Darwin/MacOSX)或者可能存在uuid_create/uuid_compare(POSIX)。[Rolf 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

感谢

安装uuid-c++-devel

lorem ipsum

最新更新