Add some missing system calls to syscalls.conf
[platform/upstream/ltrace.git] / libltrace.c
index a8dd61e..0112c9f 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
+#include "backend.h"
 #include "common.h"
 #include "proc.h"
-#include "read_config_file.h"
-#include "backend.h"
 #include "prototype.h"
+#include "read_config_file.h"
+#include "summary.h"
 
 char *command = NULL;
 
@@ -116,9 +117,13 @@ ltrace_init(int argc, char **argv)
        if (command) {
                /* Check that the binary ABI is supported before
                 * calling execute_program.  */
-               struct ltelf lte;
-               ltelf_init(&lte, command);
-               ltelf_destroy(&lte);
+               {
+                       struct ltelf lte;
+                       if (ltelf_init(&lte, command) == 0)
+                               ltelf_destroy(&lte);
+                       else
+                               exit(EXIT_FAILURE);
+               }
 
                pid_t pid = execute_program(command, argv);
                struct process *proc = open_program(command, pid);