Subject: kern/1518: seagate.c references memcmp.
To: None <gnats-bugs@gnats.netbsd.org>
From: Alistair G. Crooks <agc@uts.amdahl.com>
List: netbsd-bugs
Date: 09/26/1995 06:12:33
>Number:         1518
>Category:       kern
>Synopsis:       seagate.c references memcmp, which the linker can't resolve
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 26 09:20:01 1995
>Last-Modified:
>Originator:     Alistair G. Crooks
>Organization:
	Amdahl Corporation
>Release:        NetBSD-current 23rd September 1995
>Environment:
	NetBSD/i386 1.0A, 23rd September 1995 sources
System: NetBSD rumpy.osg.uk.amdahl.com 1.0A NetBSD 1.0A (RUMPY) #1: Mon Sep 25 11:41:27 BST 1995 agc@rumpy.osg.uk.amdahl.com:/usr/src/sys/arch/i386/compile/RUMPY i386


>Description:
	The seagate driver includes a reference to memcmp, which is
	not resolved by the linker.
>How-To-Repeat:
	Make a kernel with the seagate driver in it. The linker fails
	with `memcmp' not found.
>Fix:
	More a workaround really - it would be better to replace memcmp
	by bcmp.

*** /usr/src/sys/dev/isa/seagate.c      1995/09/25 10:40:45     1.1
--- /usr/src/sys/dev/isa/seagate.c      1995/09/26 13:16:16
***************
*** 89,94 ****
--- 89,98 ----
  #define SCB_TABLE_SIZE        8       /* start with 8 scb entries in table */
  #define BLOCK_SIZE    512     /* size of READ/WRITE areas on SCSI card */
  
+ #ifndef memcmp
+ #define memcmp bcmp
+ #endif
+ 
  /*
   * defining SEA_BLINDTRANSFER will make DATA IN and DATA OUT to be done with
   * blind transfers, i.e. no check is done for scsi phase changes. This will

>Audit-Trail:
>Unformatted:
To: gnats-bugs@gnats.netbsd.org
Subject: /sys/dev/isa/seagate.c references memcmp
From: agc
Reply-To: agc