From ec80a0b32adf8df633d249c2c7de694f37f9ab53 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 5 May 2021 10:31:54 +0200 Subject: treewide: Introduce support for missing g_memdup2 --- src/missing.h | 24 ++++++++++++++++++++++++ src/modem.c | 2 +- src/network.c | 1 + src/sim.c | 1 + src/simfs.c | 1 + src/simutil.c | 1 + src/smsutil.c | 1 + src/voicecall.c | 1 + 8 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/missing.h (limited to 'src') diff --git a/src/missing.h b/src/missing.h new file mode 100644 index 00000000..aa96e274 --- /dev/null +++ b/src/missing.h @@ -0,0 +1,24 @@ +/* + * + * oFono - Open Source Telephony + * + * Copyright (C) 2008-2011 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef HAVE_G_MEMDUP2 +#define g_memdup2(mem, size) g_memdup((mem), (size)) +#endif diff --git a/src/modem.c b/src/modem.c index bd4c1049..f4f414c7 100644 --- a/src/modem.c +++ b/src/modem.c @@ -31,8 +31,8 @@ #include #include "ofono.h" - #include "common.h" +#include "missing.h" #define DEFAULT_POWERED_TIMEOUT (20) diff --git a/src/network.c b/src/network.c index 0d54bb35..bfb88174 100644 --- a/src/network.c +++ b/src/network.c @@ -36,6 +36,7 @@ #include "simutil.h" #include "util.h" #include "storage.h" +#include "missing.h" #define SETTINGS_STORE "netreg" #define SETTINGS_GROUP "Settings" diff --git a/src/sim.c b/src/sim.c index 4a05ac32..0c4afef2 100644 --- a/src/sim.c +++ b/src/sim.c @@ -47,6 +47,7 @@ #include "storage.h" #include "simfs.h" #include "stkutil.h" +#include "missing.h" /* * A new session object will be created if a USim/ISim applications are diff --git a/src/simfs.c b/src/simfs.c index 8b838b00..3d4f6283 100644 --- a/src/simfs.c +++ b/src/simfs.c @@ -39,6 +39,7 @@ #include "simfs.h" #include "simutil.h" #include "storage.h" +#include "missing.h" #define SIM_CACHE_MODE 0600 #define SIM_CACHE_BASEPATH STORAGEDIR "/%s-%i" diff --git a/src/simutil.c b/src/simutil.c index 5d2aa6a2..9013460e 100644 --- a/src/simutil.c +++ b/src/simutil.c @@ -33,6 +33,7 @@ #include "simutil.h" #include "util.h" #include "smsutil.h" +#include "missing.h" struct sim_eons { struct sim_eons_operator_info *pnn_list; diff --git a/src/smsutil.c b/src/smsutil.c index 6911f839..8e57a065 100644 --- a/src/smsutil.c +++ b/src/smsutil.c @@ -38,6 +38,7 @@ #include "util.h" #include "storage.h" #include "smsutil.h" +#include "missing.h" #define uninitialized_var(x) x = x diff --git a/src/voicecall.c b/src/voicecall.c index 6265e4dd..3da258d8 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -38,6 +38,7 @@ #include "simutil.h" #include "smsutil.h" #include "storage.h" +#include "missing.h" #define MAX_VOICE_CALLS 16 -- cgit v1.2.1