Provide the option to enable debug information during tar backups
Change-Id: Ibdb060d334c8f799a283f1bcef4a369d5555c975
diff --git a/libtar/Android.mk b/libtar/Android.mk
index 9a35c7b..9b051e6 100755
--- a/libtar/Android.mk
+++ b/libtar/Android.mk
@@ -25,6 +25,10 @@
endif
endif
+ifeq ($(TW_LIBTAR_DEBUG),true)
+ LOCAL_CFLAGS += -DTW_LIBTAR_DEBUG
+endif
+
include $(BUILD_SHARED_LIBRARY)
# Build static library
@@ -52,4 +56,8 @@
endif
endif
+ifeq ($(TW_LIBTAR_DEBUG),true)
+ LOCAL_CFLAGS += -DTW_LIBTAR_DEBUG
+endif
+
include $(BUILD_STATIC_LIBRARY)
diff --git a/libtar/block.c b/libtar/block.c
index 8116736..6285547 100755
--- a/libtar/block.c
+++ b/libtar/block.c
@@ -18,6 +18,10 @@
# include <stdlib.h>
#endif
+#ifdef TW_LIBTAR_DEBUG
+#define DEBUG 1
+#endif
+
#ifdef HAVE_EXT4_CRYPT
#include "ext4crypt_tar.h"
#endif