Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3997452
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:24:14+00:00 2026-05-20T07:24:14+00:00

I have put all the structures in a header file named structure.h : struct

  • 0

I have put all the structures in a header file named structure.h:

struct mac_filter { 
    u_char ether_dhost[ETHER_ADDR_LEN]; 
    u_char ether_shost[ETHER_ADDR_LEN]; 
    u_short ether_type; 
}__attribute__ ((packed));

When I compile structure.h I get the following errors:

error: expected specifier-qualifier-list before ‘u_char’
u_char ether_dhost[ETHER_ADDR_LEN];(line at which there is an error )

error: expected specifier-qualifier-list before ‘u_int16_t’
u_int16_t uh_sport;(line at which there is an error )

How do I resolve these errors?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:24:14+00:00Added an answer on May 20, 2026 at 7:24 am

    If it worked before you started moving things around, it’s most likely because u_char and u_int16_t are not defined at that point.

    Change the types temporarily to int and see if the problem disappears (though you may see other problems because of that).

    If so, change them back and ensure that the types are defined before you try to use them. For example, check that the headers are included in the right order to do this. If you were to post the code, it would make it a lot easier to tell you exactly how to fix it.


    And I hesitate to ask this since it sounds condescending. You’re not actually trying to compile the header file on its own, are you? I ask simply because of your “when I compiled that structure.h” comment. If you are, you shouldn’t be. You should be compiling C files which #include header files.

    Apologies if I’ve offended, that wasn’t my intention. It’s just that I’ve seen the wondrous things that some people try to do, and that make sense to them 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my project I have put all my css classes in the style sheets.
Digital commercial products that customers pay for download link. I have put all the
I have been wondering how to put all the stored procedures on a SQL
I have information spread out across a few databases and want to put all
We have multiple vb projects.We want to put error handlers in all functions, and
I have following setup, but when I put 1024 and replace all 512 with
So I have all these classes put together for all the connectivity between Predators
I have a header row which has this structure: <th... <a... <span... {text} If
I have put together the following mootools script window.addEvent('domready', function() { var shouts =
I have put together a script which is very much like the flickr photostream

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.