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