當(dāng)前位置: 首頁IT技術(shù) → CMAKE2.8.10在HP-UNIX上安裝異常解決方法

CMAKE2.8.10在HP-UNIX上安裝異常解決方法

更多

CMAKE2.8.10在HP-UNIX上安裝異常解決方法:需要修改文件才能編譯通過

# cd cmake-2.8.10.2/

# vi Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c

Locate routine set_time_tru64. Change it so that it looks like:

#ifdef F_SETTIMES /* Tru64 */

static int

set_time_tru64(int fd, int mode, const char *name,

time_t atime, long atime_nsec,

time_t mtime, long mtime_nsec,

time_t ctime, long ctime_nsec)

{

struct attr_timbuf tstamp;

#if defined (__hpux) && defined (__ia64)

tstamp.atime.tv_sec = atime;

tstamp.atime.tv_nsec = atime_nsec;

tstamp.mtime.tv_sec = mtime;

tstamp.mtime.tv_nsec = mtime_nsec;

tstamp.ctime.tv_sec = ctime;

tstamp.ctime.tv_nsec = ctime_nsec;

#else

struct timeval times[3];

times[0].tv_sec = atime;

times[0].tv_usec = atime_nsec / 1000;

times[1].tv_sec = mtime;

times[1].tv_usec = mtime_nsec / 1000;

times[2].tv_sec = ctime;

times[2].tv_usec = ctime_nsec / 1000;

tstamp.atime = times[0];

tstamp.mtime = times[1];

tstamp.ctime = times[2];

#endif

return (fcntl(fd,F_SETTIMES,&tstamp));

}

#endif /* Tru64 */

熱門評論
最新評論
發(fā)表評論 查看所有評論(0)
昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字數(shù): 0/500 (您的評論需要經(jīng)過審核才能顯示)