Subject: kern/1518: seagate.c references memcmp.
To: None <>
From: Alistair G. Crooks <>
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
>Originator:     Alistair G. Crooks
	Amdahl Corporation
>Release:        NetBSD-current 23rd September 1995
	NetBSD/i386 1.0A, 23rd September 1995 sources
System: NetBSD 1.0A NetBSD 1.0A (RUMPY) #1: Mon Sep 25 11:41:27 BST 1995 i386

	The seagate driver includes a reference to memcmp, which is
	not resolved by the linker.
	Make a kernel with the seagate driver in it. The linker fails
	with `memcmp' not found.
	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

Subject: /sys/dev/isa/seagate.c references memcmp
From: agc
Reply-To: agc