一个管理员要求我从源代码中编译他使用的RPM(5.1.9)版本,以便对我们之间传输的文件进行签名。我在RHEL8上构建了该版本,但由于以下缺少的类型而无法运行:
./ rpmio.h:30:9:错误:未知类型名称'_IO_off64_t' typedef _IO_off64_t _libio_off_t;
相关的h文件部分如下所示:
#ifndef H_RPMIO
#define H_RPMIO
/** \ingroup rpmio
* \file rpmio/rpmio.h
*
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <rpmiotypes.h>
#include <yarn.h>
#include <rpmzlog.h>
/** \ingroup rpmio
* Hide libio API lossage.
* The libio interface changed after glibc-2.1.3 to pass the seek offset
* argument as a pointer rather than as an off_t. The snarl below defines
* typedefs to isolate the lossage.
*/
/*@{*/
#if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
#define USE_COOKIE_SEEK_POINTER 1
typedef _IO_off64_t _libio_off_t;
typedef _libio_off_t * _libio_pos_t;
#else
typedef off_t _libio_off_t;
typedef off_t _libio_pos_t;
怎么了?为什么我会收到此错误?我的环境中缺少什么?