This reorders includes alphabetically and groups them together:
- C standard library includes of depth 1 are grouped together
- "System" libraries of depth > 1 age grouped together
- The (lib)samsung-ipc include(s) is/are grouped together
We also need to keep the inclusion of sys/socket.h before linux/netlink.h
in order to prevent the following compilation error on Replicant 4.2:
bionic/libc/kernel/common/linux/netlink.h:52:2: error: unknown type
name 'sa_family_t'
While Replicant 4.2 is not really maintained anymore, it is still being
used for testing libsamsung-ipc on devices that are not supported anymore
by more recent Replicant versions, so we need to keep libsamsung-ipc and
libsamsung-ril working on it.
Signed-off-by: Denis 'GNUtoo' Carikli <[email protected]>
---
samsung-ipc/utils.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/samsung-ipc/utils.c b/samsung-ipc/utils.c
index da35e59..85f06cf 100644
--- a/samsung-ipc/utils.c
+++ b/samsung-ipc/utils.c
@@ -17,20 +17,23 @@
* along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <ctype.h>
+#include <fcntl.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdint.h>
-#include <unistd.h>
#include <string.h>
-#include <fcntl.h>
-#include <ctype.h>
+#include <unistd.h>
+
+#include <asm/types.h>
+#include <net/if.h>
#include <sys/ioctl.h>
+#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/socket.h>
-#include <asm/types.h>
+
+/* linux/netlink.h needs to be included after sys/socket.h */
#include <linux/netlink.h>
-#include <net/if.h>
#include <samsung-ipc.h>
--
2.28.0
_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant