Merge "Include what you use: <fcntl.h>"

This commit is contained in:
Treehugger Robot
2020-04-13 19:14:29 +00:00
committed by Gerrit Code Review
6 changed files with 19 additions and 7 deletions

View File

@@ -1,5 +1,11 @@
#define LOG_TAG "BitmapFactory" #define LOG_TAG "BitmapFactory"
#include <fcntl.h>
#include <netinet/in.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include "BitmapFactory.h" #include "BitmapFactory.h"
#include "CreateJavaOutputStreamAdaptor.h" #include "CreateJavaOutputStreamAdaptor.h"
#include "GraphicsJNI.h" #include "GraphicsJNI.h"
@@ -21,10 +27,6 @@
#include <androidfw/ResourceTypes.h> #include <androidfw/ResourceTypes.h>
#include <cutils/compiler.h> #include <cutils/compiler.h>
#include <memory> #include <memory>
#include <netinet/in.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
jfieldID gOptions_justBoundsFieldID; jfieldID gOptions_justBoundsFieldID;
jfieldID gOptions_sampleSizeFieldID; jfieldID gOptions_sampleSizeFieldID;

View File

@@ -14,6 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
#include <fcntl.h>
#include <sys/stat.h>
#include "Bitmap.h" #include "Bitmap.h"
#include "BitmapFactory.h" #include "BitmapFactory.h"
#include "ByteBufferStreamAdaptor.h" #include "ByteBufferStreamAdaptor.h"
@@ -33,7 +36,6 @@
#include <androidfw/Asset.h> #include <androidfw/Asset.h>
#include <jni.h> #include <jni.h>
#include <sys/stat.h>
using namespace android; using namespace android;

View File

@@ -15,6 +15,10 @@
*/ */
#define LOG_TAG "SELinuxJNI" #define LOG_TAG "SELinuxJNI"
#include <fcntl.h>
#include <errno.h>
#include <utils/Log.h> #include <utils/Log.h>
#include <nativehelper/JNIHelp.h> #include <nativehelper/JNIHelp.h>
@@ -22,7 +26,6 @@
#include "core_jni_helpers.h" #include "core_jni_helpers.h"
#include "selinux/selinux.h" #include "selinux/selinux.h"
#include "selinux/android.h" #include "selinux/android.h"
#include <errno.h>
#include <memory> #include <memory>
#include <atomic> #include <atomic>
#include <nativehelper/ScopedLocalRef.h> #include <nativehelper/ScopedLocalRef.h>

View File

@@ -14,6 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include <fcntl.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>

View File

@@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
#include <fcntl.h>
#include <nativehelper/ScopedUtfChars.h> #include <nativehelper/ScopedUtfChars.h>
#include "jni.h" #include "jni.h"

View File

@@ -16,6 +16,9 @@
#include <jni.h> #include <jni.h>
#include <fcntl.h>
#include <unistd.h>
#include <android/sharedmem.h> #include <android/sharedmem.h>
#include <android/sharedmem_jni.h> #include <android/sharedmem_jni.h>
#include <cutils/ashmem.h> #include <cutils/ashmem.h>
@@ -23,7 +26,6 @@
#include <utils/Errors.h> #include <utils/Errors.h>
#include <mutex> #include <mutex>
#include <unistd.h>
static struct { static struct {
jclass clazz; jclass clazz;