Blame SOURCES/strace-rh1044044.patch

09a367
diff -Nrup a/count.c b/count.c
09a367
--- a/count.c	2014-09-17 15:18:18.000000000 -0400
09a367
+++ b/count.c	2015-07-02 21:48:48.906419324 -0400
09a367
@@ -115,6 +115,16 @@ time_cmp(void *a, void *b)
09a367
 static int
09a367
 syscall_cmp(void *a, void *b)
09a367
 {
09a367
+	const char *name_a = sysent[*((int *) a)].sys_name;
09a367
+	const char *name_b = sysent[*((int *) b)].sys_name;
09a367
+
09a367
+	if (name_a == name_b)
09a367
+		return 0;
09a367
+	if (!name_a)
09a367
+		return -1;
09a367
+	if (!name_b)
09a367
+		return 1;
09a367
+
09a367
 	return strcmp(sysent[*((int *) a)].sys_name,
09a367
 		      sysent[*((int *) b)].sys_name);
09a367
 }