NoneBionic /libc/include/sys/epoll.h:67:8: ошибка: переопределение "epoll_event"

Я получаю следующее исключение при сборке ПЗУ для проекта lineageos, и мне нужна помощь в диагностике и устранении проблемы:

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

Источник ПЗУ: = https://github.com/LineageOS/android

Команда:

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

Полный журнал:

https://del.dog/qaridufuca

1 ответ

Решение

Я исправил это, позаимствовав код из другой версии ядра, которая включает следующую проверку

#ifdef __KERNEL__

Полный фрагмент ниже:

#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__ */

Commit:

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

Другие вопросы по тегам