bc76bd3957cf1a3ed1d9ede0fac08ade22680ee7
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / irda-utils / 0002-nommu.patch
1 written by Mike Frysinger
2
3 https://sourceforge.net/tracker/?func=detail&aid=3132056&group_id=5616&atid=305616
4
5 nommu systems cannot fork() as the hardware cannot support
6 it. irattach uses it as a minor optimization, but it isnt
7 necessary for correct functioning of the utility. so add a
8 NO_FORK define so we nommu peeps can do CFLAGS="... -DNO_FORK=1
9 ..." and use it in our embedded systems.
10
11 --- a/irattach/irattach.c
12 +++ b/irattach/irattach.c
13 @@ -397,7 +397,11 @@
14                                         after_names[i]);
15                                 /* Create a new instance for this other
16                                  * interface */
17 +#ifdef NO_FORK
18 +                               pid = -1;
19 +#else
20                                 pid = fork();
21 +#endif
22                                 /* If in the child */
23                                 if(!pid) {
24                                         /* Get the interface name */