Bug 1230759: Part 4 - update moz build for libsrtp 2.2 draft
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Tue, 07 Nov 2017 22:05:41 -0800
changeset 702423 2dab6f228b116d6304dc47202103ae5c1eb4448f
parent 702422 3422f12cfb42ab7d96e9dfa285c0dffa8b9d19d2
child 741467 d8b963648b54f034ee14d8cbcc9d3f85a796b555
push id90487
push userdrno@ohlmeier.org
push dateThu, 23 Nov 2017 07:07:55 +0000
bugs1230759
milestone59.0a1
Bug 1230759: Part 4 - update moz build for libsrtp 2.2 MozReview-Commit-ID: 9OQrMrszpy8
netwerk/srtp/src/moz.build
--- a/netwerk/srtp/src/moz.build
+++ b/netwerk/srtp/src/moz.build
@@ -1,55 +1,58 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 UNIFIED_SOURCES += [
     'crypto/cipher/aes.c',
-    'crypto/cipher/aes_cbc.c',
     'crypto/cipher/aes_icm.c',
     'crypto/cipher/cipher.c',
     'crypto/cipher/null_cipher.c',
     'crypto/hash/auth.c',
     'crypto/hash/hmac.c',
     'crypto/hash/null_auth.c',
     'crypto/hash/sha1.c',
     'crypto/kernel/alloc.c',
     'crypto/kernel/crypto_kernel.c',
     'crypto/kernel/err.c',
     'crypto/kernel/key.c',
     'crypto/math/datatypes.c',
     'crypto/math/stat.c',
     'crypto/replay/rdb.c',
     'crypto/replay/rdbx.c',
     'crypto/replay/ut_sim.c',
-    'crypto/rng/ctr_prng.c',
-    'crypto/rng/prng.c',
-    'crypto/rng/rand_source.c',
     'srtp/ekt.c',
     'srtp/srtp.c',
 ]
 
 Library('nksrtp_s')
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     'crypto/include',
     'include',
 ]
 
+DEFINES['PACKAGE_STRING'] = '"libsrtp2 2.2.0-pre"'
+DEFINES['PACKAGE_VERSION'] = '"2.2.0-pre"'
+
+# This is needed to enable the be32_to_cpu and be64_to_cpu
+# macro's in datatypes.h
+DEFINES['HAVE_CONFIG_H'] = 1
+
 # We know stdint.h will define uint8/16/32/64_t, so we don't need
 # to define SIZEOF_UNSIGNED_LONG/SIZEOF_UNSIGNED_LONG_LONG
 for var in ('HAVE_STDLIB_H', 'HAVE_UINT8_T', 'HAVE_UINT16_T',
-            'HAVE_UINT32_T', 'HAVE_UINT64_T'):
+            'HAVE_INT32_T', 'HAVE_UINT32_T', 'HAVE_UINT64_T'):
     DEFINES[var] = 1
 
 # XXX while arm is not a CISC architecture, the code guarded by CPU_RISC makes
 # (at least) the AES ciphers fail their self-tests on ARM, so for now we're
 # falling back to the (presumably) slower-on-this-architecture but working
 # code path.  https://bugzilla.mozilla.org/show_bug.cgi?id=822380 has been filed
 # to make the right and more performant fix and push it back upstream.
 if CONFIG['CPU_ARCH'] in ('arm', 'x86', 'x86_64', 'mips', 'mips64'):
@@ -59,11 +62,13 @@ else:
     DEFINES['CPU_RISC'] = 1
 
 if  CONFIG['CPU_ARCH'] in ('x86', 'x86_64'):
     DEFINES['HAVE_X86'] = True
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     DEFINES['HAVE_WINSOCK2_H'] = True
     DEFINES['inline'] = '__inline'
+else:
+    DEFINES['HAVE_NETINET_IN_H'] = 1
 
 if CONFIG['GNU_CC']:
     CFLAGS += ['-std=gnu99']