원래 프로그램 test.c에서 #include <linux/videodev.h>만을 했는데도 이런 에러가 발생하니.. 막막하기만 합니다.

 

arm-linux-gcc -o armvideotest test.c -I/home/jaeheon/uvcvideo/linux/include
In file included from /usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev.h:8,
                 from test.c:5:
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:436: error: parse error before '*' token
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:438: error: parse error before '*' token
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:439: error: parse error before '}' token
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:810: error: field `win' has incomplete type
In file included from test.c:5:
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev.h:225: error: parse error before '*' token
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev.h:226: error: conflicting types for 'clipcount'
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:437: error: previous declaration of 'clipcount' was here
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev.h:232: error: parse error before '}' token
make: *** [arm] 오류 1

 

각 행을 찾아보면 다음과 같습니다. (에러난 곳을 굵은 표시하였습니다.)

__user가 문제가 되는 것 같은데.. 구글링해도 잘 찾아지지가 않네요. 어떻게 해야하나요?

videodev2.h (431~439)
[code]struct v4l2_window
{
 struct v4l2_rect        w;
 enum v4l2_field   field;
 __u32   chromakey;
[b] struct v4l2_clip __user *clips;[/b]
 __u32   clipcount;
 [b]void   __user *bitmap;[/b]
};[/code]

videodev2.h (804~814)

[code]struct v4l2_format
{
 enum v4l2_buf_type type;
 union
 {
  struct v4l2_pix_format pix;  // V4L2_BUF_TYPE_VIDEO_CAPTURE
 [b] struct v4l2_window win;  // V4L2_BUF_TYPE_VIDEO_OVERLAY[/b]
  struct v4l2_vbi_format vbi;  // V4L2_BUF_TYPE_VBI_CAPTURE
  __u8 raw_data[200];        // user-defined
 } fmt;
};[/code]


videodev.h  (219~232)
[code]struct video_window
{
 __u32 x,y;   /* Position of window */
 __u32 width,height;  /* Its size */
 __u32 chromakey;
 __u32 flags;
 [b]struct video_clip __user *clips; /* Set only */[/b]
 [b]int clipcount;[/b]
#define VIDEO_WINDOW_INTERLACE 1
#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */
#define VIDEO_CLIP_BITMAP -1
/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
#define VIDEO_CLIPMAP_SIZE (128 * 625)
[b]};[/b][/code]