Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202483 - gentoo-sources-2.6.23-r4 compile fails on apm-emulation.c
Summary: gentoo-sources-2.6.23-r4 compile fails on apm-emulation.c
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
: 202486 (view as bug list)
Depends on:
Blocks: 202064
  Show dependency tree
 
Reported: 2007-12-16 17:02 UTC by Lupo
Modified: 2007-12-22 03:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix the apm-emulation.c compilation failure (apm.patch,2.90 KB, patch)
2007-12-16 20:55 UTC, Florian Fainelli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lupo 2007-12-16 17:02:45 UTC
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
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-12-16 17:04:36 UTC
*** Bug 202486 has been marked as a duplicate of this bug. ***
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-12-16 17:07:22 UTC
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
Comment 3 Florian Fainelli 2007-12-16 20:55:17 UTC
Attached patch fixes the compilation and works for me (iBook G4 ppc).
Comment 4 Florian Fainelli 2007-12-16 20:55:56 UTC
Created attachment 138651 [details, diff]
Patch to fix the apm-emulation.c compilation failure
Comment 5 Lupo 2007-12-18 00:05:19 UTC
(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 */




Comment 6 Mike Pagano gentoo-dev 2007-12-19 15:13:14 UTC
The kernel version that contains this patch will soon be part of gentoo-sources.
Comment 7 Mike Pagano gentoo-dev 2007-12-21 21:20:08 UTC
Please test with gentoo-sources-2.6.23-r5 which should hit the mirrors shortly after I type this.
Comment 8 Mike Pagano gentoo-dev 2007-12-22 03:04:52 UTC
This should be fixed with gentoo-sources-2.6.23-r5. Please reopen if the same compilation error occurs.