[{"id":1762165,"web_url":"http://patchwork.ozlabs.org/comment/1762165/","msgid":"<20170902170336.piispo3i3xk62pxq@unicorn.suse.cz>","list_archive_url":null,"date":"2017-09-02T17:03:36","subject":"Re: [PATCH] Fix build on fedora-14 (and other older systems)","submitter":{"id":11892,"url":"http://patchwork.ozlabs.org/api/people/11892/","name":"Michal Kubecek","email":"mkubecek@suse.cz"},"content":"On Sat, Sep 02, 2017 at 07:15:02AM -0700, greearb@candelatech.com wrote:\n> From: Ben Greear <greearb@candelatech.com>\n> \n> Seems Fedora-20 and below fail, hopefully this fixes\n> them.\n> \n> Signed-off-by: Ben Greear <greearb@candelatech.com>\n> ---\n>  include/linux/sysinfo.h | 8 ++++++++\n>  ip/ipxfrm.c             | 1 +\n>  ip/xfrm_policy.c        | 1 +\n>  ip/xfrm_state.c         | 1 +\n>  4 files changed, 11 insertions(+)\n\nWorks for me from openSUSE Tumbleweed to SLE11 SP4 (kernel 3.0). The\nbuild on SLE11 SP2 (also 3.0 but older headers in /usr/include)\nfails with unknown MS_PRIVATE and MS_REC in lib/bpf.c\nNewer systems have these defined in <sys/mount.h>\n\nIncluding <linux/fs.h> directly in lib/bpf.c fixes that but if we do\nthat, a copy of the file would have to be included.\n\n> diff --git a/include/linux/sysinfo.h b/include/linux/sysinfo.h\n> index 934335a..3596b02 100644\n> --- a/include/linux/sysinfo.h\n> +++ b/include/linux/sysinfo.h\n> @@ -3,6 +3,14 @@\n>  \n>  #include <linux/types.h>\n>  \n> +/* So we can compile on older OSs, hopefully this is correct. --Ben */\n> +#ifndef __kernel_long_t\n> +typedef long __kernel_long_t;\n> +#endif\n> +#ifndef __kernel_ulong_t\n> +typedef unsigned long __kernel_ulong_t;\n> +#endif\n> +\n>  #define SI_LOAD_SHIFT\t16\n>  struct sysinfo {\n>  \t__kernel_long_t uptime;\t\t/* Seconds since boot */\n\nI'm not sure if it is acceptable to modify a file which is supposed to\nbe a direct copy of kernel uapi header.\n\nMichal Kubecek","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl2Zl5Sxkz9sRW\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun,  3 Sep 2017 03:06:39 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752741AbdIBRDj (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 2 Sep 2017 13:03:39 -0400","from mx2.suse.de ([195.135.220.15]:47412 \"EHLO mx1.suse.de\"\n\trhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP\n\tid S1752732AbdIBRDi (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tSat, 2 Sep 2017 13:03:38 -0400","from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])\n\tby mx1.suse.de (Postfix) with ESMTP id 326FDABB2;\n\tSat,  2 Sep 2017 17:03:37 +0000 (UTC)","by unicorn.suse.cz (Postfix, from userid 1000)\n\tid AC266A0F21; Sat,  2 Sep 2017 19:03:36 +0200 (CEST)"],"X-Virus-Scanned":"by amavisd-new at test-mx.suse.de","Date":"Sat, 2 Sep 2017 19:03:36 +0200","From":"Michal Kubecek <mkubecek@suse.cz>","To":"greearb@candelatech.com","Cc":"netdev@vger.kernel.org","Subject":"Re: [PATCH] Fix build on fedora-14 (and other older systems)","Message-ID":"<20170902170336.piispo3i3xk62pxq@unicorn.suse.cz>","References":"<1504361702-30266-1-git-send-email-greearb@candelatech.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1504361702-30266-1-git-send-email-greearb@candelatech.com>","User-Agent":"NeoMutt/20170421 (1.8.2)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1762293,"web_url":"http://patchwork.ozlabs.org/comment/1762293/","msgid":"<20170903085004.5b5ded4f@xeon-e3>","list_archive_url":null,"date":"2017-09-03T15:50:04","subject":"Re: [PATCH] Fix build on fedora-14 (and other older systems)","submitter":{"id":21389,"url":"http://patchwork.ozlabs.org/api/people/21389/","name":"Stephen Hemminger","email":"stephen@networkplumber.org"},"content":"On Sat,  2 Sep 2017 07:15:02 -0700\ngreearb@candelatech.com wrote:\n\n> diff --git a/include/linux/sysinfo.h b/include/linux/sysinfo.h\n> index 934335a..3596b02 100644\n> --- a/include/linux/sysinfo.h\n> +++ b/include/linux/sysinfo.h\n> @@ -3,6 +3,14 @@\n>  \n>  #include <linux/types.h>\n>  \n> +/* So we can compile on older OSs, hopefully this is correct. --Ben */\n> +#ifndef __kernel_long_t\n> +typedef long __kernel_long_t;\n> +#endif\n> +#ifndef __kernel_ulong_t\n> +typedef unsigned long __kernel_ulong_t;\n> +#endif\n> +\n>  #define SI_LOAD_SHIFT\t16\n>  struct sysinfo {\n>  \t__kernel_long_t uptime;\t\t/* Seconds since boot */\n\nI am not accepting this patch because all files in include/linux are automatically\nregenerated from kernel 'make install_headers'. No exceptions. If you want to change\na header in include/linux it has to go through upstream kernel inclusion.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=networkplumber-org.20150623.gappssmtp.com\n\theader.i=@networkplumber-org.20150623.gappssmtp.com\n\theader.b=\"nNGG2Ean\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xlcr310mFz9t3F\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon,  4 Sep 2017 01:50:11 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753146AbdICPuI (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSun, 3 Sep 2017 11:50:08 -0400","from mail-pf0-f169.google.com ([209.85.192.169]:35409 \"EHLO\n\tmail-pf0-f169.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753049AbdICPuH (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sun, 3 Sep 2017 11:50:07 -0400","by mail-pf0-f169.google.com with SMTP id g13so12022730pfm.2\n\tfor <netdev@vger.kernel.org>; Sun, 03 Sep 2017 08:50:07 -0700 (PDT)","from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240])\n\tby smtp.gmail.com with ESMTPSA id\n\ta21sm7599106pfj.89.2017.09.03.08.50.06\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 03 Sep 2017 08:50:06 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=C85Odw59S6MLIAnL5Pz/RIiCOQmkuJ+0dSuxYFljiLQ=;\n\tb=nNGG2EanT60aR+qpRXjGVoXtpIN5DwgjI1fEe2qErnA+3F08rspn9UbKnZFHI8SuQh\n\tk1ZFRGYOl97W2P/8ZV/oQlSf68pKplQIAQW+ydM9uTK9NOTfpAPFWrALADgSmgJoAuuc\n\tujQmXpbZENNZVxE8BTqOfqxrcBuq0SqrgJXhA5wUcSlAJoBWYBDuQ6njn3lYrfUSFSQv\n\tyal9zli9oEu5yse3FLXVh7EZNhgH0DJRAW5AViJeMGns8e29lHy5D/oEW5TZUuO9TTQd\n\tp+6ETIEBYZDlqGkUtwsSTNy7M7YsqLsI3W1U9ZAO0Lbh1MqQU+oD6MW/+mxXAAi6C6ma\n\tHoqQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=C85Odw59S6MLIAnL5Pz/RIiCOQmkuJ+0dSuxYFljiLQ=;\n\tb=QKgHpRD7DJIZrOfNRKrYxKG2bv9a761HQkirrctE67bzX3OmBiVDEieewahzVq9uTI\n\t25R/Cq9Kbc2oKJhknHMGiZqPHLjcscTYmOkgB1KBtr8yTfLq9lZhdRLdOZsTQMDJCzD3\n\tYibTzX94xuIgw1EXwn6MWtjbaPsE0d4RN3GiQJ9m8wIhZs7UjMkfOH226ceX2XM6J+/y\n\t0EgGe4SINXmK8jHdvFqd2rUKJNDcRELD5NsaF5bSTWbRZHP5wyF7anEJcPxjCpoDP0P9\n\t5jXcBroaWgQfHc6jabUo14DhPzV8cDWNB8EcrSK1scRqqsnxGX2ErmQaAP6zEMN3dCvG\n\tTnJw==","X-Gm-Message-State":"AHPjjUilNOM12r7YOrrE5dXIOmtJqRG2VI+MV7HS27JX+haoMDIzmaGw\n\tEBxC8A0kXHRlPfXKn58H+A==","X-Google-Smtp-Source":"ADKCNb4jRpnvk4NahbG2XboYJFaLwhkjWqHROaQz0jVh1avmUvNKZCrVddyjIiSu2p7BsDEk1dD2Vg==","X-Received":"by 10.84.129.106 with SMTP id 97mr9780480plb.110.1504453806795; \n\tSun, 03 Sep 2017 08:50:06 -0700 (PDT)","Date":"Sun, 3 Sep 2017 08:50:04 -0700","From":"Stephen Hemminger <stephen@networkplumber.org>","To":"greearb@candelatech.com","Cc":"netdev@vger.kernel.org","Subject":"Re: [PATCH] Fix build on fedora-14 (and other older systems)","Message-ID":"<20170903085004.5b5ded4f@xeon-e3>","In-Reply-To":"<1504361702-30266-1-git-send-email-greearb@candelatech.com>","References":"<1504361702-30266-1-git-send-email-greearb@candelatech.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1762323,"web_url":"http://patchwork.ozlabs.org/comment/1762323/","msgid":"<7cdfe2a6-9235-ce67-e5d6-db39ed03c936@candelatech.com>","list_archive_url":null,"date":"2017-09-03T18:28:20","subject":"Re: [PATCH] Fix build on fedora-14 (and other older systems)","submitter":{"id":852,"url":"http://patchwork.ozlabs.org/api/people/852/","name":"Ben Greear","email":"greearb@candelatech.com"},"content":"On 09/03/2017 08:50 AM, Stephen Hemminger wrote:\n> On Sat,  2 Sep 2017 07:15:02 -0700\n> greearb@candelatech.com wrote:\n>\n>> diff --git a/include/linux/sysinfo.h b/include/linux/sysinfo.h\n>> index 934335a..3596b02 100644\n>> --- a/include/linux/sysinfo.h\n>> +++ b/include/linux/sysinfo.h\n>> @@ -3,6 +3,14 @@\n>>\n>>  #include <linux/types.h>\n>>\n>> +/* So we can compile on older OSs, hopefully this is correct. --Ben */\n>> +#ifndef __kernel_long_t\n>> +typedef long __kernel_long_t;\n>> +#endif\n>> +#ifndef __kernel_ulong_t\n>> +typedef unsigned long __kernel_ulong_t;\n>> +#endif\n>> +\n>>  #define SI_LOAD_SHIFT\t16\n>>  struct sysinfo {\n>>  \t__kernel_long_t uptime;\t\t/* Seconds since boot */\n>\n> I am not accepting this patch because all files in include/linux are automatically\n> regenerated from kernel 'make install_headers'. No exceptions. If you want to change\n> a header in include/linux it has to go through upstream kernel inclusion.\n\nIt would be wrong to add this to the actual kernel header I think.\n\nDo you have another suggestion for fixing iproute2 compile?\n\nThanks,\nBen","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xlhLd4MgSz9sDB\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon,  4 Sep 2017 04:28:25 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751568AbdICS2X (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSun, 3 Sep 2017 14:28:23 -0400","from mail2.candelatech.com ([208.74.158.173]:55638 \"EHLO\n\tmail2.candelatech.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751287AbdICS2W (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sun, 3 Sep 2017 14:28:22 -0400","from [104.235.162.31] (104-235-162-31.evrt.wa.frontiernet.net\n\t[104.235.162.31])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby mail2.candelatech.com (Postfix) with ESMTPSA id 6705640A539;\n\tSun,  3 Sep 2017 11:28:21 -0700 (PDT)"],"Subject":"Re: [PATCH] Fix build on fedora-14 (and other older systems)","To":"Stephen Hemminger <stephen@networkplumber.org>","References":"<1504361702-30266-1-git-send-email-greearb@candelatech.com>\n\t<20170903085004.5b5ded4f@xeon-e3>","Cc":"netdev@vger.kernel.org","From":"Ben Greear <greearb@candelatech.com>","Message-ID":"<7cdfe2a6-9235-ce67-e5d6-db39ed03c936@candelatech.com>","Date":"Sun, 3 Sep 2017 11:28:20 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.8.0","MIME-Version":"1.0","In-Reply-To":"<20170903085004.5b5ded4f@xeon-e3>","Content-Type":"text/plain; charset=windows-1252; format=flowed","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]