xref: /OK3568_Linux_fs/buildroot/package/irda-utils/0002-nommu.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1written by Mike Frysinger
2
3https://sourceforge.net/tracker/?func=detail&aid=3132056&group_id=5616&atid=305616
4
5nommu systems cannot fork() as the hardware cannot support
6it. irattach uses it as a minor optimization, but it isnt
7necessary for correct functioning of the utility. so add a
8NO_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 */
25