gentoo-sources-2.6.23-r4 fails on make: CC drivers/char/apm-emulation.o drivers/char/apm-emulation.c: In function 'apm_ioctl': drivers/char/apm-emulation.c:370: error: implicit declaration of function 'wait_event_freezable' make[2]: *** [drivers/char/apm-emulation.o] Error 1 make[1]: *** [drivers/char] Error 2 make: *** [drivers] Error 2 Reproducible: Always
*** Bug 202486 has been marked as a duplicate of this bug. ***
Yeah, because it's broken upstream. This ebuild should be nuked and replaced w/ .11 http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.23.11
Attached patch fixes the compilation and works for me (iBook G4 ppc).
Created attachment 138651 [details, diff] Patch to fix the apm-emulation.c compilation failure
(In reply to comment #4) > Created an attachment (id=138651) [edit] > Patch to fix the apm-emulation.c compilation failure > "patch -p1 < apm.patch" results in this: patching file include/linux/freezer.h Hunk #1 succeeded at 4 with fuzz 2. Hunk #2 FAILED at 127. Hunk #3 FAILED at 174. 2 out of 3 hunks FAILED -- saving rejects to file include/linux/freezer.h.rej cat /usr/src/linux-2.6.23-gentoo-r4/include/linux/freezer.h.rej: *************** *** 127,163 **** current->flags &= ~PF_NOFREEZE; } - /* - * Freezer-friendly wrappers around wait_event_interruptible() and - * wait_event_interruptible_timeout(), originally defined in <linux/wait.h> - */ - - #define wait_event_freezable(wq, condition) \ - ({ \ - int __ret; \ - do { \ - __ret = wait_event_interruptible(wq, \ - (condition) || freezing(current)); \ - if (__ret && !freezing(current)) \ - break; \ - else if (!(condition)) \ - __ret = -ERESTARTSYS; \ - } while (try_to_freeze()); \ - __ret; \ - }) - - - #define wait_event_freezable_timeout(wq, condition, timeout) \ - ({ \ - long __ret = timeout; \ - do { \ - __ret = wait_event_interruptible_timeout(wq, \ - (condition) || freezing(current), \ - __ret); \ - } while (try_to_freeze()); \ - __ret; \ - }) - #else /* CONFIG_PM */ static inline int frozen(struct task_struct *p) { return 0; } static inline int freezing(struct task_struct *p) { return 0; } static inline void set_freeze_flag(struct task_struct *p) {} --- 126,132 ---- current->flags &= ~PF_NOFREEZE; } + #else static inline int frozen(struct task_struct *p) { return 0; } static inline int freezing(struct task_struct *p) { return 0; } static inline void set_freeze_flag(struct task_struct *p) {} *************** *** 174,186 **** static inline void freezer_count(void) {} static inline int freezer_should_skip(struct task_struct *p) { return 0; } static inline void set_freezable(void) {} - - #define wait_event_freezable(wq, condition) \ - wait_event_interruptible(wq, condition) - - #define wait_event_freezable_timeout(wq, condition, timeout) \ - wait_event_interruptible_timeout(wq, condition, timeout) - - #endif /* CONFIG_PM */ #endif /* FREEZER_H_INCLUDED */ --- 143,148 ---- static inline void freezer_count(void) {} static inline int freezer_should_skip(struct task_struct *p) { return 0; } static inline void set_freezable(void) {} + #endif #endif /* FREEZER_H_INCLUDED */
The kernel version that contains this patch will soon be part of gentoo-sources.
Please test with gentoo-sources-2.6.23-r5 which should hit the mirrors shortly after I type this.
This should be fixed with gentoo-sources-2.6.23-r5. Please reopen if the same compilation error occurs.