From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 12 19:46:14 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D004106566C; Tue, 12 Jul 2011 19:46:14 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id E0C168FC14; Tue, 12 Jul 2011 19:46:13 +0000 (UTC) Received: by iyb11 with SMTP id 11so6378182iyb.13 for ; Tue, 12 Jul 2011 12:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=lXJ+1AYmZAjHH18lewEUP4McJygy5LanVn9/OcL9Z5A=; b=poM0ztRmih3/LeMKH6w9ad5ZCqsIPQeuD1h8yH9F3l78SCl7uHVLa6T9jsGPUYdw5p vHmJhDYMTi52Ar5/Tfhr3U34IPSHXQ768mzIUBKF4FESfafIWmJv52/KUdc9umukpz9S dL7/Omj6ffMJ5u/dS1EdOM+RPEMxoGyEQRJYM= MIME-Version: 1.0 Received: by 10.42.147.65 with SMTP id m1mr265011icv.46.1310499973134; Tue, 12 Jul 2011 12:46:13 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.42.222.7 with HTTP; Tue, 12 Jul 2011 12:46:12 -0700 (PDT) Date: Tue, 12 Jul 2011 21:46:12 +0200 X-Google-Sender-Auth: t3GV2Bih3JgRmLqhAm8KzqWxq3c Message-ID: From: Robert Millan To: freebsd-hackers@freebsd.org, Ed Maste Content-Type: multipart/mixed; boundary=90e6ba1efd3a6077af04a7e48d27 Cc: Subject: [PATCH] fake pre-processor macros when building on non-FreeBSD system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2011 19:46:14 -0000 --90e6ba1efd3a6077af04a7e48d27 Content-Type: text/plain; charset=UTF-8 When building kernel code on a non-FreeBSD system, kernel source still expects pre-processor macros to be those of a FreeBSD system. If __linux__ is defined, build will break. If __FreeBSD__ isn't defined, build will break too. This small patch "fakes" the pre-processor macros of FreeBSD so that non-FreeBSD systems such as GNU/Linux can build the kernel of FreeBSD too. -- Robert Millan --90e6ba1efd3a6077af04a7e48d27 Content-Type: text/plain; charset=US-ASCII; name="prepro.diff" Content-Disposition: attachment; filename="prepro.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gq19u68y0 LS0tIGEvc3lzL2NvbmYva2Vybi5wcmUubWsKKysrIGIvc3lzL2NvbmYva2Vybi5wcmUubWsKQEAg LTkwLDYgKzkwLDE0IEBACiAuZW5kaWYKIFdFUlJPUj89IC1XZXJyb3IKIAorLmlmICFkZWZpbmVk KE9QU1lTKQorT1BTWVMhPSB1bmFtZSAtcworLmVuZGlmCisKKy5pZiAke09QU1lTfSAhPSAiRnJl ZUJTRCIKK0NGTEFHUys9IC1VbGludXggLVVfX2xpbnV4X18gLURfX0ZyZWVCU0RfXworLmVuZGlm CisKICMgWFhYIExPQ09SRSBtZWFucyAiZG9uJ3QgZGVjbGFyZSBDIHN0dWZmIiBub3QgImZvciBs b2NvcmUucyIuCiBBU01fQ0ZMQUdTPSAteCBhc3NlbWJsZXItd2l0aC1jcHAgLURMT0NPUkUgJHtD RkxBR1N9CiAKLS0tIGEvc3lzL2NvbmYva21vZC5taworKysgYi9zeXMvY29uZi9rbW9kLm1rCkBA IC05Niw2ICs5NiwxNCBAQAogQ0ZMQUdTKz0JLURfS0VSTkVMCiBDRkxBR1MrPQktREtMRF9NT0RV TEUKIAorLmlmICFkZWZpbmVkKE9QU1lTKQorT1BTWVMhPQkJdW5hbWUgLXMKKy5lbmRpZgorCisu aWYgJHtPUFNZU30gIT0gIkZyZWVCU0QiCitDRkxBR1MrPQktVWxpbnV4IC1VX19saW51eF9fIC1E X19GcmVlQlNEX18KKy5lbmRpZgorCiAjIERvbid0IHVzZSBhbnkgc3RhbmRhcmQgb3Igc291cmNl LXJlbGF0aXZlIGluY2x1ZGUgZGlyZWN0b3JpZXMuCiBDU1REPQkJYzk5CiBOT1NURElOQz0JLW5v c3RkaW5jCg== --90e6ba1efd3a6077af04a7e48d27--