【问题标题】:bionic/libc/include/sys/epoll.h:67:8: error: redefinition of 'epoll_event'仿生/libc/include/sys/epoll.h:67:8: 错误: 'epoll_event' 的重新定义
【发布时间】:2019-11-30 14:53:49
【问题描述】:

我在为 lineageos 项目构建 ROM 时遇到以下异常,需要一些帮助来诊断和解决问题:

In file included from device/lenovo/tb8504f/camera/QCamera2/util/QCameraDisplay.cpp:53:
In file included from system/core/libutils/include/utils/Looper.h:25:
bionic/libc/include/sys/epoll.h:67:8: error: redefinition of 'epoll_event'
struct epoll_event {
       ^
out/target/product/tb8504f/obj/KERNEL_OBJ/usr/include/linux/eventpoll.h:59:8: note: previous definition is here
struct epoll_event {
       ^

生成 1 个错误。

设备树:= https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/tree/lineage-15.1

供应商树:= https://github.com/darran-kelinske-fivestars/android_vendor_lenovo_tb8504f/tree/lineage-15.1

内核来源:= https://github.com/dazza5000/android_kernel_lenovo_msm8937/tree/tb8504f

ROM来源:= https://github.com/LineageOS/android

命令:

repo sync -j20 && source build/envsetup.sh && breakfast tb8504f && make -j20 | tee rom.log

完整日志:

https://del.dog/qaridufuca

【问题讨论】:

    标签: android-kernel lineageos


    【解决方案1】:

    我通过从包含以下检查的不同内核版本借用代码来解决此问题

    #ifdef __KERNEL__
    

    下面是完整的sn-p:

    #ifdef __KERNEL__
    struct epoll_event {
    struct epoll_event {
        __u32 events;
        __u32 events;
        __u64 data;
        __u64 data;
    @@ -73,4 +74,5 @@ static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev)
        epev->events &= ~EPOLLWAKEUP;
        epev->events &= ~EPOLLWAKEUP;
    }
    }
    #endif
    #endif
    #endif /* __KERNEL__ */
    

    提交:

    https://github.com/dazza5000/android_kernel_lenovo_msm8937/commit/ab8195cd2bc6f1c283d79568540d5792c9ed55c2

    【讨论】:

      猜你喜欢
      • 2019-08-30
      • 1970-01-01
      • 2015-12-16
      • 1970-01-01
      • 1970-01-01
      • 2010-12-07
      • 2010-11-05
      • 2015-06-10
      • 1970-01-01
      相关资源
      最近更新 更多