From patchwork Tue Dec 18 12:49:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin 'ldir' Darbyshire-Bryant X-Patchwork-Id: 1015347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=darbyshire-bryant.me.uk Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YaVw9ZlC"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=darbyshire-bryant.me.uk header.i=@darbyshire-bryant.me.uk header.b="n2HrWLJL"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43JyXh0BSsz9sBZ for ; Tue, 18 Dec 2018 23:49:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-ID:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Wwc7XjjjquJORrspEShPy2Jce9q/5YuI6EYk6j04OTE=; b=YaVw9ZlCKlxeoR 0nAXi3U/ku5dRjUs/2q0xCJ7m5YN6MHyr56yrDSeRjZaoo+zshlYJRGuH0gG7fWUf2EcdpbUbNFks EJQTw9pR2W9yDCMfj2UGKplBjG2F/Cs99THr69i9pxpzmPldRJHdYxazqaOSTr7gWwAsz8gypk542 7opDVE/oTrbA0Lg9BUmggUb7ldLIPld204o04NX+mbEy8hHISIDQf8m2tgxkvVi9YGrdmZmDnQPiW vUGNmwb02R0IvnXU6rhOuBU+I7LicpT8v5jLOOssB7+W2G8H34/JMd8wNnBsVQzRYwVbaAmvVxx6/ mFiIf9IR9PXxK36HPv3w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZEok-0008M7-8w; Tue, 18 Dec 2018 12:49:46 +0000 Received: from mail-eopbgr50046.outbound.protection.outlook.com ([40.107.5.46] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZEoh-0008LJ-3E for openwrt-devel@lists.openwrt.org; Tue, 18 Dec 2018 12:49:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darbyshire-bryant.me.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pdmkIilhPIV0zIHco0QoVAY0fDlLt2ONfxJSjxp1nHk=; b=n2HrWLJLgb4us6cqxQuiQtKPFRwXrP5qOPlnLtDNwk9Z3uG/AgWMQW5ZsujxjCwpz5piLJHRCaGy+p8f7Jouy11JshmIiAvmL3316RmtNbQ82bPLuPHkqZ5ACVDip0lMtM+9dTs8pqZFnLVV4awI10Q2YPHf2DRznKZzmHG5ISE= Received: from VI1PR0302MB2750.eurprd03.prod.outlook.com (10.171.105.143) by VI1PR0302MB3389.eurprd03.prod.outlook.com (52.134.13.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.19; Tue, 18 Dec 2018 12:49:28 +0000 Received: from VI1PR0302MB2750.eurprd03.prod.outlook.com ([fe80::d77:d217:1660:c5d4]) by VI1PR0302MB2750.eurprd03.prod.outlook.com ([fe80::d77:d217:1660:c5d4%2]) with mapi id 15.20.1425.023; Tue, 18 Dec 2018 12:49:28 +0000 From: Kevin 'ldir' Darbyshire-Bryant To: "openwrt-devel@lists.openwrt.org" Thread-Topic: [PATCH] tools: Update endian definitions for Mac OSX Thread-Index: AQHUltAdmDJ9wbJc+EO/HYYONE+bMA== Date: Tue, 18 Dec 2018 12:49:28 +0000 Message-ID: <20181218124903.10456-1-ldir@darbyshire-bryant.me.uk> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0051.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::15) To VI1PR0302MB2750.eurprd03.prod.outlook.com (2603:10a6:800:e2::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ldir@darbyshire-bryant.me.uk; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2a02:c7f:1240:ee00::dc83] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0302MB3389; 6:fueELzPjw2CYXFodRG6HZvM9MfAMD0ay+xMaLAr5STf/ZA4cioB3B9w0WMrSkNF58wElkn+ikEWZVKuBNS2O4eOiB7j3tPFytFUOzyaTkxtW7W7huQKVNZGAai7BbokfSjVF4xOo/4WoNxTqpJsUpS57pbM9uN5hUwFox2NtymtBOS5PtI1SRuH5W4/nRihpRuUPvae3UjqRWvC5C86K+1xKRxrYWuEo8gwFiXoYYoJXKydAbRVIUVCrUfNi60I0U0RpqW4Slo+cjfenEM2BE4LLojRMgCNUQNyIe+99x5aKwN57UBnHatHE32kjmY+XST0Wh1TqJYu+uhChE7z69+uziJgZHz5Bi6m8K9AqO7KvGMOvLQ1810mXhHVwEFgtYzNZ4SiUZT+hpbUBXLu5r28U4nrGQMs3QO4B/pZ1f237Pu4VZs7+qCiOO8BV9oY4NMw9vc3S2mmaIglB3krRsw==; 5:QqKW0hZk4Iblr/dWflftd/jpHTQXu2M7G7a40nc5UbZgAXBMzI2bPCb0lgDv9BWoF1xUcvfGCTWL9KviVm3dxtweuxzIRiIwbvy/2dLQNYq2okJI8so1Sccxd9MPmQ3H47julsmcEeRMmkIEK4au+Ca0mKdJaLCnDw8YUOEjGcM=; 7:h32f5srM7s3XcgYuwBjYa43KvqtN3OD+XN9lY+at9KHsMGfefoco/H6EdKF8iE7kATIo39LgD8WmUZR+V8H1AmJFDsJYZc7xIvqnyYvu86F2v0fNRqUhJ2I0BUS15z0dZjYarqG1BKtEMycP8rTkUg== x-ms-office365-filtering-correlation-id: ca85adbf-c212-481f-f92d-08d664e73f27 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR0302MB3389; x-ms-traffictypediagnostic: VI1PR0302MB3389: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(3230021)(999002)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(20161123562045)(6043046)(201708071742011)(7699051)(76991095); SRVR:VI1PR0302MB3389; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0302MB3389; x-forefront-prvs: 08902E536D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(39830400003)(346002)(136003)(199004)(189003)(86362001)(2906002)(6116002)(6512007)(2616005)(53936002)(2351001)(106356001)(105586002)(305945005)(14444005)(6486002)(256004)(107886003)(5640700003)(8936002)(6436002)(6506007)(386003)(476003)(186003)(102836004)(46003)(8676002)(316002)(81166006)(486006)(68736007)(2501003)(52116002)(81156014)(74482002)(97736004)(5660300001)(14454004)(6916009)(71200400001)(99286004)(508600001)(25786009)(4326008)(36756003)(71190400001)(7736002)(1076003)(46800400005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0302MB3389; H:VI1PR0302MB2750.eurprd03.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: darbyshire-bryant.me.uk does not designate permitted sender hosts) x-microsoft-antispam-message-info: FiJ7QrSgQho000ymNv+4ro59wv6zprvKCHfsfvkCopOXWu+r3uHkvioMP1F7bqL6yomQrIHJjDfSDsCs6KI65tErHbxrm2uB/UA4dmyz6hk9Z+4ofrXLNWWiL6lQqWE2GZxllQBNKqzCH82Zn8rjdx5ybZxBRrRNZpe/zgfYABAu8Ib1RWyNMiv6WDHcAp5KHSUvgJX+gnZxGJ8q76BwFZHOUqGIZGa+koIfp5eDJXXOvr3tO5g9KycIhWEfZ6pFf7op0IlaJE+m0pBmlxxSne/PDoBrpXgztX/sAMWOE4O93h2J6hVpECr5B+zH6gN6 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: darbyshire-bryant.me.uk X-MS-Exchange-CrossTenant-Network-Message-Id: ca85adbf-c212-481f-f92d-08d664e73f27 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2018 12:49:28.7748 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9151708b-c553-406f-8e56-694f435154a4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0302MB3389 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181218_044943_196338_87FC1B20 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [40.107.5.46 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH] tools: Update endian definitions for Mac OSX X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin 'ldir' Darbyshire-Bryant Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org - it appears (at least from OS X verison 10.10, Yosemite) that the big and little endian defintions have changed. the older #include #include reference yielded the following warning: #define __bswap_16(x) NXSwapShort(x) ^ /usr/include/architecture/byte_order.h:45:1: note: 'NXSwapShort' has been explicitly marked deprecated here For the new OS X editions, it seems that we need to refer to: #include #include and respectively use 'OSSwapInt16', 'OSSwapInt32', & 'OSSwapInt64', in place of 'NXSwapShort', 'NXSwapLong' & 'NXSwapLongLong'. Signed-off-by: Kevin Darbyshire-Bryant --- tools/include/endian.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/include/endian.h b/tools/include/endian.h index bba70abd83..e2ac755667 100644 --- a/tools/include/endian.h +++ b/tools/include/endian.h @@ -5,11 +5,11 @@ #include #include_next #elif defined(__APPLE__) -#include -#include -#define bswap_16(x) NXSwapShort(x) -#define bswap_32(x) NXSwapInt(x) -#define bswap_64(x) NXSwapLongLong(x) +#include +#include +#define bswap_16(x) OSSwapInt16(x) +#define bswap_32(x) OSSwapInt32(x) +#define bswap_64(x) OSSwapInt64(x) #elif defined(__FreeBSD__) #include #define bswap_16(x) bswap16(x)