commit e56ae2fb3292a76fa2328beb55bc586c371f9ca3
parent 76c6f72c53ce69719e68389c3041346885dde147
Author: Boss Marco <bossm8@students.bfh.ch>
Date: Sun, 17 Nov 2019 18:33:45 +0100
close diplay fd's
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -46,15 +46,12 @@ along with
#include <gnunet/gnunet_util_lib.h>
#include <taler/taler_json_lib.h>
#include <taler/taler_merchant_service.h>
-
-/* for adafruit pitft display */
-#include <sys/types.h>
-#include <sys/stat.h>
+#if HAVE_QRENCODE_H /* for adafruit pitft display */
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <linux/fb.h>
-
+#endif
/**
* Disable i18n support.
@@ -366,6 +363,9 @@ shutdown_task (void *cls)
/* close device */
close (qrDisplay.devicefd);
qrDisplay.devicefd = -1;
+ if (0 < qrDisplay.backlightfd)
+ close (qrDisplay.backlightfd);
+ qrDisplay.backlightfd = -1;
}
if (NULL != products)
{