Error compiling waitforvsync.cpp

The waitforvsync.cpp throws error when compiling. Following is the error log

target thumb C++: test-waitforvsync <= frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp
frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp: In function 'int main(int, char**)':
frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp:43:17: error: 'close' was not declared in this scope
         close(fd);
                 ^
....
....

make: *** [out/target/product/grouper/obj/EXECUTABLES/test-waitforvsync_intermediates/waitforvsync.o] Error 1

the file is missing #include <unistd.h>

Change-Id: I57728dbde65641cd3138625f9a590f9db8648158
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
This commit is contained in:
Nanik Tolaram 2015-02-14 00:26:59 +11:00
parent 8511b3ae5e
commit ee9701744a

View File

@ -23,6 +23,7 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h>
#ifndef FBIO_WAITFORVSYNC #ifndef FBIO_WAITFORVSYNC
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)