summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-12-29 12:24:25 -0800
committerElliott Hughes <enh@google.com>2014-12-29 12:24:25 -0800
commit0badbd6565fea17be39d82eba858fa76d28920a4 (patch)
tree8ca328b75740a85cafe6afafde97162569d56dad
parent2978ad4c6d660f02ff0a1742749b6818b2616b69 (diff)
downloadsystem_core-0badbd6565fea17be39d82eba858fa76d28920a4.tar.gz
system_core-0badbd6565fea17be39d82eba858fa76d28920a4.tar.bz2
system_core-0badbd6565fea17be39d82eba858fa76d28920a4.zip
Fix missing #includes in system/core.
Change-Id: I4736e8c4f7bb8bb03640d26d58243efaa67dc75c
-rw-r--r--fastbootd/commands/partitions.c1
-rw-r--r--fastbootd/config.c1
-rw-r--r--fastbootd/transport.c1
-rw-r--r--fastbootd/usb_linux_client.c1
-rw-r--r--fastbootd/utils.c1
-rw-r--r--libmemtrack/memtrack.c1
-rw-r--r--libprocessgroup/processgroup.cpp1
-rw-r--r--toolbox/getevent.c1
-rw-r--r--toolbox/ioctl.c1
-rw-r--r--toolbox/ps.c12
-rw-r--r--toolbox/r.c1
-rw-r--r--toolbox/sendevent.c1
-rw-r--r--toolbox/smd.c1
-rw-r--r--toolbox/touch.c1
-rw-r--r--toolbox/uptime.c2
15 files changed, 19 insertions, 8 deletions
diff --git a/fastbootd/commands/partitions.c b/fastbootd/commands/partitions.c
index f2c9da73c..3b279590e 100644
--- a/fastbootd/commands/partitions.c
+++ b/fastbootd/commands/partitions.c
@@ -31,6 +31,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
diff --git a/fastbootd/config.c b/fastbootd/config.c
index fe6da697a..012a1978b 100644
--- a/fastbootd/config.c
+++ b/fastbootd/config.c
@@ -29,6 +29,7 @@
* SUCH DAMAGE.
*/
+#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
diff --git a/fastbootd/transport.c b/fastbootd/transport.c
index 9a16fd767..232c99929 100644
--- a/fastbootd/transport.c
+++ b/fastbootd/transport.c
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <errno.h>
#include <pthread.h>
#include <stddef.h>
#include <stdio.h>
diff --git a/fastbootd/usb_linux_client.c b/fastbootd/usb_linux_client.c
index 2c678b92a..beaafc37c 100644
--- a/fastbootd/usb_linux_client.c
+++ b/fastbootd/usb_linux_client.c
@@ -15,6 +15,7 @@
*/
#include <endian.h>
+#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
diff --git a/fastbootd/utils.c b/fastbootd/utils.c
index bef24633a..a9ab47ebe 100644
--- a/fastbootd/utils.c
+++ b/fastbootd/utils.c
@@ -28,6 +28,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
diff --git a/libmemtrack/memtrack.c b/libmemtrack/memtrack.c
index 9a656dfd3..5d680830b 100644
--- a/libmemtrack/memtrack.c
+++ b/libmemtrack/memtrack.c
@@ -20,6 +20,7 @@
#include <log/log.h>
+#include <errno.h>
#include <hardware/memtrack.h>
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index 4b09f247c..a80965fd0 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -19,6 +19,7 @@
#include <assert.h>
#include <dirent.h>
+#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdbool.h>
diff --git a/toolbox/getevent.c b/toolbox/getevent.c
index da83ec38d..c58eb5d1c 100644
--- a/toolbox/getevent.c
+++ b/toolbox/getevent.c
@@ -10,6 +10,7 @@
#include <sys/poll.h>
#include <linux/input.h>
#include <errno.h>
+#include <unistd.h>
#include "getevent.h"
diff --git a/toolbox/ioctl.c b/toolbox/ioctl.c
index 73539d140..d1cc14a08 100644
--- a/toolbox/ioctl.c
+++ b/toolbox/ioctl.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <pthread.h>
#include <sys/ioctl.h>
+#include <unistd.h>
int ioctl_main(int argc, char *argv[])
{
diff --git a/toolbox/ps.c b/toolbox/ps.c
index 4f001b811..7d6dfa096 100644
--- a/toolbox/ps.c
+++ b/toolbox/ps.c
@@ -1,15 +1,13 @@
-#include <stdio.h>
-#include <stdlib.h>
#include <ctype.h>
+#include <dirent.h>
#include <fcntl.h>
-
+#include <pwd.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-
#include <sys/stat.h>
#include <sys/types.h>
-#include <dirent.h>
-
-#include <pwd.h>
+#include <unistd.h>
#include <cutils/sched_policy.h>
diff --git a/toolbox/r.c b/toolbox/r.c
index 618367726..b96cdb279 100644
--- a/toolbox/r.c
+++ b/toolbox/r.c
@@ -5,6 +5,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
+#include <unistd.h>
#if __LP64__
#define strtoptr strtoull
diff --git a/toolbox/sendevent.c b/toolbox/sendevent.c
index 4b5a761aa..4d0ca1760 100644
--- a/toolbox/sendevent.c
+++ b/toolbox/sendevent.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
+#include <unistd.h>
int sendevent_main(int argc, char *argv[])
{
diff --git a/toolbox/smd.c b/toolbox/smd.c
index 91e495c3f..343dea70a 100644
--- a/toolbox/smd.c
+++ b/toolbox/smd.c
@@ -3,6 +3,7 @@
#include <string.h>
#include <fcntl.h>
#include <errno.h>
+#include <unistd.h>
int smd_main(int argc, char **argv)
{
diff --git a/toolbox/touch.c b/toolbox/touch.c
index 52ddf2a55..980f0d353 100644
--- a/toolbox/touch.c
+++ b/toolbox/touch.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
+#include <unistd.h>
static void usage(void)
{
diff --git a/toolbox/uptime.c b/toolbox/uptime.c
index 3fb46061d..2dd808443 100644
--- a/toolbox/uptime.c
+++ b/toolbox/uptime.c
@@ -36,7 +36,7 @@
#include <fcntl.h>
#include <stdio.h>
#include <time.h>
-
+#include <unistd.h>
static void format_time(int time, char* buffer) {
int seconds, minutes, hours, days;