Libpri compilation errors in ubuntu

I was following the voip-info.org/wiki/view/How+ … untu+Linux

for installing asterisk on ubuntu desktop.

I am getting compiling error in libpri-1.4.1


gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q931.o q931.c
In file included from q931.c:27:
pri_internal.h:263: error: expected declaration specifiers or ‘…’ before 'size_t’
q931.c: In function ‘receive_calling_party_number’:
q931.c:949: error: too many arguments to function 'libpri_copy_string’
q931.c: In function ‘transmit_keypad_facility’:
q931.c:1425: error: too many arguments to function 'libpri_copy_string’
q931.c: In function ‘q931_keypad_facility’:
q931.c:2492: error: too many arguments to function 'libpri_copy_string’
q931.c: In function ‘pri_release_finaltimeout’:
q931.c:2667: error: too many arguments to function 'libpri_copy_string’
q931.c: In function ‘q931_setup’:
q931.c:2817: error: too many arguments to function 'libpri_copy_string’
q931.c:2820: error: too many arguments to function 'libpri_copy_string’
q931.c:2837: error: too many arguments to function 'libpri_copy_string’
q931.c:2854: error: too many arguments to function 'libpri_copy_string’
q931.c:2860: error: too many arguments to function 'libpri_copy_string’
q931.c: In function ‘q931_receive’:
q931.c:3314: error: too many arguments to function 'libpri_copy_string’
q931.c:3315: error: too many arguments to function ‘libpri_copy_string’

How to fix it