Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Aug 2012 03:49:08 -0300
From:      Jan Beich <jbeich@tormail.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/170406: [patch] audio/oss: implicit declaration of 'device_set_desc'
Message-ID:  <1SyH7K-00044K-D3@internal.tormail.org>
Resent-Message-ID: <201208060700.q767078E069501@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         170406
>Category:       ports
>Synopsis:       [patch] audio/oss: implicit declaration of 'device_set_desc'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 06 07:00:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
CFLAGS += -Werror=implicit-function-declaration # for crash safety
>Description:
>How-To-Repeat:
$ make CC=clang
[...]
os_freebsd.c:236:5: warning: implicit declaration of function 'device_set_desc' is invalid in C99 [-Wimplicit-function-declaration]
    device_set_desc (osdev->dip, name);
    ^
1 warning generated.
>Fix:
--- clang.diff begins here ---
Index: audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c
===================================================================
--- audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c	(revision 301674)
+++ audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c	(working copy)
@@ -1,10 +1,11 @@
 --- kernel/OS/FreeBSD/os_freebsd.c	2012-02-02 17:46:03.000000000 -0500
 +++ kernel/OS/FreeBSD/os_freebsd.c	2012-02-20 12:58:46.000000000 -0500
-@@ -16,6 +16,7 @@
+@@ -16,6 +16,8 @@
  #include "midi_core.h"
  #include <oss_pci.h>
  #include <sys/conf.h>
 +#include <sys/module.h>
++#include <sys/bus.h>
  #include <sys/proc.h>
  #include <sys/sx.h>
  #include <sys/mman.h>
Index: audio/oss/Makefile
===================================================================
--- audio/oss/Makefile	(revision 301674)
+++ audio/oss/Makefile	(working copy)
@@ -91,6 +91,10 @@ do-configure:
 	(cd ${WRKSRC} && \
 	    ${SETENV} ${CONFIGURE_ENV} ${PATCH_WRKSRC}/configure)
 
+post-configure:
+	${TOUCH} ${WRKSRC}/include/device_if.h
+	${TOUCH} ${WRKSRC}/include/bus_if.h
+
 do-install:
 	${INSTALL_PROGRAM} ${PROTO_BINDIR}/* ${PREFIX}/bin/
 # @${ECHO_CMD} "OSSLIBDIR=${PREFIX}/lib/oss" > ${PROTO_ETCDIR}/oss.conf
--- clang.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1SyH7K-00044K-D3>