Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp617264ybg; Tue, 9 Jun 2020 08:38:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfrC+pMMGXjmNxj4eSmlhRVPVleSC0Ym9EJp011CrJ+5Zuh2d5T8lgtiDnuYhF6ul+7eIZ X-Received: by 2002:a17:907:2678:: with SMTP id ci24mr25443052ejc.284.1591717113445; Tue, 09 Jun 2020 08:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591717113; cv=none; d=google.com; s=arc-20160816; b=D9Zr8R260MzaapVY09dOFTn4rms4sFriHfA+zTSw8UgnkQP4zMzbcBdVXZN4VLl8tA 07BIKFGOnQ6fzKsEiY/zLCNqS12XX9SIk/0aRtfyISxBqi0VcrJVZx7J4U8b4eDiUgAc JWMgPJs2eQmM5bmu3ne04rQLFeIcOLbWmJ4xR6UoFJiwRokmojxifNY6+NTu2yno2hiJ WbDd2I8MqGI7OGRiMZjy3Kg8grgmwNI55VvN0Ef+FvKhFTUJkku8YmdjHxf7bJrycsst wAUM6kSgMV+8mRkJVyKgBMXHMfmKQYKYYODW1q4MZObGTnBGOebCpFK1vEVK9buuWwK+ Ca8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TvChkdnz4WVjJIVXB8FHPjPFGfbM6TvU8LI8i35jpV0=; b=SujiS/i1NVDvGB3/bpCvZIcUPtTA+E/S9GEx1R6bTXezFcNdA/TueyCSFh2cnf7npu H3As0qcYOSNpZ8qXIf5ko8oQ5vfe0mMdh7M0oo03Bk1w37sp8+w+OvKxnMRd20mh3WZP gaHtz10tqgrQDYsBv10oayeXziQKZWThB5VSHL067wA7stGF+uwL3d43JteuEiKCrIa8 Nlg5deeMlGfbjXlUovzxZZWVvXTtsqoD0qeK3ZzZADxQyIsAhEDl+P0phA6TAOr14yMK yN5SvFfBdXvsploq9V7Ep0vnvfK4wy6RbIdgQEZ122ZuKzFydVvC9DVycXed4QTxqWfa hbUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qgjvGX24; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd24si10998575edb.336.2020.06.09.08.38.10; Tue, 09 Jun 2020 08:38:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qgjvGX24; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730800AbgFIPet (ORCPT + 99 others); Tue, 9 Jun 2020 11:34:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:56850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728944AbgFIPes (ORCPT ); Tue, 9 Jun 2020 11:34:48 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 977322078C; Tue, 9 Jun 2020 15:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591716887; bh=SjUD8eXXZBGDWqYSqypEuULp19RlOZk9QwEig+BKhWM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qgjvGX24h8SPLgzwY5OO7GMOfvs81R5fGNtGbiT00wiKibqlYwPIQg1P/gAtQKWL5 t2/oZMXoRDtQfCjr56HVQUTFRLSXu2kHkM/b8T68TovW/v0Pbm0VWxwxF/rRa4S8Xf Yb4Kv+6qQRohC2pJlood/fWU7UAsKpC5b1sp5csM= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 0F91A40AFD; Tue, 9 Jun 2020 12:34:45 -0300 (-03) Date: Tue, 9 Jun 2020 12:34:45 -0300 From: Arnaldo Carvalho de Melo To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ian Rogers , Namhyung Kim , Pekka Enberg , Jiri Olsa , Irina Tirdea , bpf , Linux Kernel Mailing List Subject: [PATCH] libbpf: Define __WORDSIZE if not available Message-ID: <20200609153445.GF24868@kernel.org> References: <20200608161150.GA3073@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some systems, such as Android, don't have a define for __WORDSIZE, do it in terms of __SIZEOF_LONG__, as done in perf since 2012: http://git.kernel.org/torvalds/c/3f34f6c0233ae055b5 For reference: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html I build tested it here and Andrii did some Travis CI build tests too. Acked-by: Andrii Nakryiko Signed-off-by: Arnaldo Carvalho de Melo