On 2020-01-13 6:34 a.m., kbuild test robot wrote:
Hi Douglas,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on scsi/for-next]
[also build test ERROR on linus/master v5.5-rc5]
[cannot apply to mkp-scsi/for-next next-20200110]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-add-v4-interface/20200113-080059
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-d003-20200112 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from <command-line>:32:0:
./usr/include/scsi/sg.h:44:2: error: unknown type name 'size_t'
size_t iov_len; /* Length in bytes */
^~~~~~
That patch never touched "./usr/include/scsi/sg.h" but the error line
does correspond with include/uapi/scsi/sg.h . That file does include
<linux/types.h> on line 31 which should take care of defining size_t
within the kernel.
But is this a user space compilation check? According to cppreference.com
for C size_t is defined in:
Defined in header <stddef.h>
Defined in header <stdio.h>
Defined in header <stdlib.h>
Defined in header <string.h>
Defined in header <time.h>
Defined in header <uchar.h> (since C11)
Defined in header <wchar.h> (since C95)
So is a solution to include <stddef.h> ? Or should <linux/types.h> do
that if it only conditionally defines size_t ? Or am I on the wrong
track?
Doug Gilbert