Updated with output from a Linux VM.
Thank you Laurent_R. I just tried with the -d option and root access is not required. There is space followed by a dot after the -l (letter l as in larry).
mkdir /tmp/phfiles
cd /usr/include
h2ph -d /tmp/phfiles -r -l .
cd /tmp/phfiles
grep sendmsg */*.ph
grep recvmsg */*.ph
Below, the grep output from a 64-bit Linux OS. Thus, the values are 46 and 47 for sendmsg and recvmsg respectively.
$ cd /tmp/phfiles
$ grep sendmsg */*.ph
asm-generic/unistd.ph:eval 'sub __NR_sendmsg () {211;}' unless defined
+(&__NR_sendmsg);
asm/unistd_64.ph: eval 'sub __NR_sendmsg () {46;}' unless defined(&
+__NR_sendmsg);
asm/unistd_x32.ph: eval 'sub __NR_sendmsg () {( &__X32_SYSCALL_BIT
++ 518);}' unless defined(&__NR_sendmsg);
bits/syscall.ph: eval 'sub SYS_sendmsg () { &__NR_sendmsg;}' unless
+ defined(&SYS_sendmsg);
bits/syscall.ph: eval 'sub SYS_sendmsg () { &__NR_sendmsg;}' unless
+ defined(&SYS_sendmsg);
$ grep recvmsg */*.ph
asm-generic/unistd.ph:eval 'sub __NR_recvmsg () {212;}' unless defined
+(&__NR_recvmsg);
asm/unistd_64.ph: eval 'sub __NR_recvmsg () {47;}' unless defined(&
+__NR_recvmsg);
asm/unistd_x32.ph: eval 'sub __NR_recvmsg () {( &__X32_SYSCALL_BIT
++ 519);}' unless defined(&__NR_recvmsg);
bits/syscall.ph: eval 'sub SYS_recvmsg () { &__NR_recvmsg;}' unless
+ defined(&SYS_recvmsg);
bits/syscall.ph: eval 'sub SYS_recvmsg () { &__NR_recvmsg;}' unless
+ defined(&SYS_recvmsg);