From owner-freebsd-drivers@FreeBSD.ORG Fri Sep 21 13:56:08 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3D1816A418 for ; Fri, 21 Sep 2007 13:56:08 +0000 (UTC) (envelope-from michael@askozia.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.freebsd.org (Postfix) with ESMTP id 6253713C468 for ; Fri, 21 Sep 2007 13:56:07 +0000 (UTC) (envelope-from michael@askozia.com) Received: by ug-out-1314.google.com with SMTP id a2so642197ugf for ; Fri, 21 Sep 2007 06:56:06 -0700 (PDT) Received: by 10.78.160.2 with SMTP id i2mr19006hue.1190381223652; Fri, 21 Sep 2007 06:27:03 -0700 (PDT) Received: by 10.78.72.1 with HTTP; Fri, 21 Sep 2007 06:27:03 -0700 (PDT) Message-ID: Date: Fri, 21 Sep 2007 15:27:03 +0200 From: "Michael Iedema" To: freebsd-drivers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: first time module dev question: undefined reference to 'memset' X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2007 13:56:08 -0000 Greetings everyone, I'm undertaking the seemingly simple task of porting a Linux kernel module to FreeBSD. I say simple because it is merely a wrapper used to expose some functions to another module. The code I'm porting is OSLEC[1] a line echo canceller module that is used by Zaptel and Asterisk. My current problem is an undefined reference to 'memset' when I attempt to load the cleanly compiled module. There is a lengthy discussion about this error here[2] but I could find no conclusive remedy. My wrapper module links with code from another library and it is causing the problems in kernel land. Here is my module so far: http://pastebin.ca/705865 ...and my broken Makefile: http://pastebin.ca/705871 If anyone could point me in the right direction it would be very appreciated. I realize that I am out of my league dealing with kernel modules but the porting process looked easy enough. As with most new adventures, this has proved untrue. Thanks for your time, -Michael I. [1] - http://www.rowetel.com/ucasterisk/oslec.html [2] - http://lists.freebsd.org/pipermail/freebsd-stable/2005-March/013132.html