2013-01-02 11 views
1

최근 Ubuntu를 10.04에서 12.04로 업데이트했습니다. Linux 커널이 2.6.35-30-server에서 3.0.0-29-server로 변경되었습니다. 업데이트 후에 현재 드라이버 코드를 컴파일 할 때 오류가 발생합니다.리눅스 semaphore_init : 함수의 암시 적 선언 'semaphore_init'

error: implicit declaration of function 'semaphore_init' [-Werror=implict-function-declaration].

어떻게 해결할 수 있습니까?

답변

3

semaphore_init이 나만의 기능인 경우가 아니면 sema_init을 대신 쓰길 원합니다.

+2

이것은 실제로 대답입니다. 나는 2.6. *에서 작동하는 이유를 모르지만 [3.0. *] (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.)에서는 작동하지 않습니다. gb; a = blob; f = include/linux/semaphore.h; h = dc368b8ce215ccc0f6a2b44a16dd2aaa603dbcd1; hb = HEAD). 'semaphore_init (x)'대신'sema_init (x, 1)'를 사용하십시오. –

+0

감사합니다. 이제 작동합니다. – Pintu

관련 문제