File: missing-includes.diff

package info (click to toggle)
libqapt 3.0.5-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,372 kB
  • sloc: cpp: 11,270; makefile: 13; sh: 11
file content (28 lines) | stat: -rw-r--r-- 668 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Author: Pino Toscano <pino@debian.org>
Description: Add missing include
 Include system headers needed for stdlib functions:
 - <unistd.h> for close(), sleep(), usleep()
Last-Update: 2022-07-24
Forwarded: no

--- a/src/worker/aptlock.cpp
+++ b/src/worker/aptlock.cpp
@@ -23,6 +23,8 @@
 #include <apt-pkg/error.h>
 #include <QDebug>
 
+#include <unistd.h>
+
 AptLock::AptLock(const QString &path)
     : m_path(path.toUtf8())
     , m_fd(-1)
--- a/src/worker/aptworker.cpp
+++ b/src/worker/aptworker.cpp
@@ -47,6 +47,7 @@
 // System includes
 #include <sys/statvfs.h>
 #include <sys/statfs.h>
+#include <unistd.h>
 #define RAMFS_MAGIC     0x858458f6
 
 // Own includes