Bug 4351

Summary: double #include for _BIONIC_
Product: Busybox Reporter: Michael Tokarev <mjt+busybox>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: trivial CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Michael Tokarev 2011-10-21 21:41:34 UTC
Commit 14bd16ac56e81e4912341cb731dc54af0dbe9e6c introduced a nice change:

--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -25,6 +25,9 @@
 #include "libbb.h"
 #include <mntent.h>
 #include <sys/swap.h>
+#ifndef __BIONIC__
+# include <sys/swap.h>
+#endif
 
 #if ENABLE_FEATURE_MOUNT_LABEL
 # include "volume_id.h"

So, sys/swap.h gets include twice for anything but _BIONIC_, and once for _BIONIC_.  I guess the first #include were intended to go away with introduction of the #if conditional.  Does it actually build with bionic?

Thanks,

/mjt
Comment 1 Denys Vlasenko 2011-10-22 04:39:28 UTC
Fixed, thanks.