Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1394637pxk; Thu, 10 Sep 2020 14:18:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVmWXsAzmPEGSzoDPC8WjsUR5BCgZoT4dscxZSdy9sLW/i9uWTpqx9liQ2Bcuh9Ez5ze8f X-Received: by 2002:a50:f199:: with SMTP id x25mr11119596edl.347.1599772729382; Thu, 10 Sep 2020 14:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599772729; cv=none; d=google.com; s=arc-20160816; b=mD2+WFtIilCkodj/1s2X0y4YD1a51IkALFlhQTPKmgtMQcO35g0M3nmDRiVWRTP3ak ZN6KYvZrDENFNwcQGzfu1RjxlFtW0Knz+OB2gBYTScL/K6Tu2cxl1bDKGRw6fWpURWw3 tJZCvLPNiyFH6PrBJVMBLK4sWM1ZDwbQkH69gFYaKtZbiw75e24jUgwpobAGCPn2jNK9 kd1JFcBP1UfMLzZ1vo3gHc8FAQEokNl+0Vc20WNeV7sWxfwegw9RNYvuU1sKFDn60/s9 JAey4P+HWdrTCQ2NCICsSpVfFL7OtsUKG5p5U1jtwIFKYlgQyfdFzKSfvr0juKbTddLr A5og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gqjbEQ+JeLk9q1JnfATQ7HDINLif+TFuce7/ySYMVUw=; b=gbGEZju6Z4XK7JGWAqsCsipkpTulrxakGHlD3SkWZsC9p8Mppk+Er2sbzH03B10uF7 nRPV/3n8bhtDqRtKQMWuu1j3rk60urrVUIENhGUdxN01w2GmyF/9VwMVChCQd85Op7eZ ZwM5t9zO9B/dMhhcbXlzucd/fZbQL1u3EH7fkFhymMZKQ9gTlMNP0YFZR/rugCmeI0uk pSW70jmGx4rrfvS4N6QTJjhtaqBmmrGOr1cfRDAxQRqcFz3xu/2P1WcOxEfekES+1Wmf FRxUamt+Pfb9i8LdjcUdRoapegZpk749xpbSsi6tkbahYgKqX+7AI48pvgJE12lTXX4F iWjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r7Hhw5pK; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si4873511edi.491.2020.09.10.14.18.26; Thu, 10 Sep 2020 14:18:49 -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=@gmail.com header.s=20161025 header.b=r7Hhw5pK; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728099AbgIJVRe (ORCPT + 99 others); Thu, 10 Sep 2020 17:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728077AbgIJVPM (ORCPT ); Thu, 10 Sep 2020 17:15:12 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B817C0617B9; Thu, 10 Sep 2020 14:14:38 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id c19so2696836wmd.1; Thu, 10 Sep 2020 14:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gqjbEQ+JeLk9q1JnfATQ7HDINLif+TFuce7/ySYMVUw=; b=r7Hhw5pK13gbq+j9zlfRVbSPt5nuEHSI2HsW1G3gee4gpU/+brOMrgStnitQQeuFJM FkhMwtO57Ab5+okqlXO8W0nhmwRtpXNBZj6J7ANxpU+cmq8EskHCJ/EnGAv/T0VC5tJS yXfLkdpNB8rVovQ7IrvA5xN9GF4T+7gcx7jQ1KUTUI2RLvCq5uC80EnGwnQYTvLQ77lz qkpqj1UnB5uspLCGk318paFoXfRaQzDM4CQ71RWnN4icoocNFXjCM9vNVB+Db5VLyDrV BJ5zbLMa7YICiIJ5Opcoq5wNSLLmc5zMZBF8rUjvq/KEbPuivBUJJ0rPwgELdTADaWLt c7gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gqjbEQ+JeLk9q1JnfATQ7HDINLif+TFuce7/ySYMVUw=; b=kEi5HWlsSUHqpDGOM7ZPm2ZJVK5pXcSkC5n9eg5CBpAUwXqTF9RzS7ewocViQJ1H8a b3z5rpMF4SnIzkJI/IinzHaS/n5CfgzMwh3Am1vXGsZE/3KzLsX1NunW6vuMZIIxLR2S IM9LZG39AP+ph3y4j9V8PvXOAz7MvGYI6fLvL2RFz0n+PZJzsw5NqT8jDD35m9UV2pO6 KOkG810SfyTmr6XZGPJ+IAAW11eJlUi7sczxGMJgOaU0wLVMab6xw57KBrCb37wMbGVS YRy59CSd19TsoEoDbK5h06L/yVu0r8q90loyaNbj7JSNeEEcS/A/OJJvX6e/DhqpAKlc usdA== X-Gm-Message-State: AOAM533rBeaoG/1D40ZPUo4Z5a+BHatI5mvD2uE+7oJ+YcjsPE06cVNa fNSiozdPkO+bI4kTZlnMoErDP3KUnGaoGA== X-Received: by 2002:a7b:c2aa:: with SMTP id c10mr1952809wmk.86.1599772475861; Thu, 10 Sep 2020 14:14:35 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id l10sm111502wru.59.2020.09.10.14.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 14:14:35 -0700 (PDT) From: Alejandro Colomar To: mtk.manpages@gmail.com Cc: linux-man@vger.kernel.org, linux-kernel@vger.kernel.org, Alejandro Colomar Subject: [PATCH 24/24] bpf.2: Add missing headers Date: Thu, 10 Sep 2020 23:13:45 +0200 Message-Id: <20200910211344.3562-25-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200910211344.3562-1-colomar.6.4.3@gmail.com> References: <20200910211344.3562-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I added some headers to reduce the number of warnings. I found the needed headers by using grep, but maybe some of them shouldn't be included directly. The example still has many problems to compile. Signed-off-by: Alejandro Colomar --- man2/bpf.2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/man2/bpf.2 b/man2/bpf.2 index b45acde76..d26d6a43d 100644 --- a/man2/bpf.2 +++ b/man2/bpf.2 @@ -981,6 +981,18 @@ ioctl(event_fd, PERF_EVENT_IOC_SET_BPF, prog_fd); * 3. attach prog_fd to raw socket via setsockopt() * 4. print number of received TCP/UDP packets every second */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + int main(int argc, char **argv) { -- 2.28.0