aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDRC <information@libjpeg-turbo.org>2023-06-16 11:20:15 -0400
committerSadaf Ebrahimi <sadafebrahimi@google.com>2024-01-09 21:48:54 +0000
commit8dba43af7a7aad13ddc7c255af0a7ff7042a14d3 (patch)
treec26e744ad70a3c45d33e81d86db901833c19cc33
parenteefbdb76d4c1a5b8f7180602923feb8f238b5573 (diff)
downloadlibjpeg-turbo-8dba43af7a7aad13ddc7c255af0a7ff7042a14d3.tar.gz
Fix build warnings/errs w/ -DNO_GETENV/-DNO_PUTENV
- strtest.c: Fix unused variable warnings if both -DNO_GETENV and -DNO_PUTENV are specified or if only -DNO_GETENV is specified. - jinclude.h: Fix build error if only -DNO_GETENV is specified. Fixes #697 Test: TreeHugger Change-Id: Ib64d2efa7e83f6c0155d84085d4c9d79c2f65964
-rw-r--r--README.android2
-rw-r--r--jinclude.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/README.android b/README.android
index b2003e8e..36563562 100644
--- a/README.android
+++ b/README.android
@@ -13,3 +13,5 @@ backwards compatibility since it's not really costing us anything.
We `#define` these in jconfig.h rather than in Android.bp so that they're
correctly exported to any *users* (in particular, jerror.h only conditionally
defines the corresponding error codes if these `#define`s are present).
+
+Cherry-pick on 2024/01/08: https://github.com/libjpeg-turbo/libjpeg-turbo/commit/c27695a193a7cb265ef8e45c7b28bda3a71c70ce
diff --git a/jinclude.h b/jinclude.h
index e8d983ac..56e7a4b2 100644
--- a/jinclude.h
+++ b/jinclude.h
@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1994, Thomas G. Lane.
* libjpeg-turbo Modifications:
- * Copyright (C) 2022, D. R. Commander.
+ * Copyright (C) 2022-2023, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -123,6 +123,8 @@ static INLINE int GETENV_S(char *buffer, size_t buffer_size, const char *name)
#else
+#include <errno.h>
+
/* This provides a similar interface to the Microsoft _putenv_s() function, but
* other than parameter validation, it has no advantages over setenv().
*/