<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Compilation broken on linux 2.6 - unknown type name 'sa_family_t'"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=67075">67075</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compilation broken on linux 2.6 - unknown type name 'sa_family_t'
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jesper.larsen@ixonos.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=82673" name="attach_82673" title="Patch">attachment 82673</a> <a href="attachment.cgi?id=82673&action=edit" title="Patch">[details]</a></span>
Patch

The following commit breaks compilation with Linux kernel headers from 2.6.37.

<a href="http://cgit.freedesktop.org/systemd/systemd/commit/?id=2e996f4d4b642c5682c608c9692ad2ffae398ab2">http://cgit.freedesktop.org/systemd/systemd/commit/?id=2e996f4d4b642c5682c608c9692ad2ffae398ab2</a>

Compilation breaks with the output

In file included from src/nspawn/nspawn.c:42:0:
/usr/include/linux/netlink.h:31:2: error: unknown type name 'sa_family_t'

linux/netlink.h includes linux/socket.h for sa_family_t, but it is protected by
a #ifdef __KERNEL__

Newer kernels have fixed this issue such that linux/netlink.h is self
contained.

A work around is to include linux/netlink.h after sys/socket.h

I have attached a patch that does this, and verified that it fixes compilation
on the 2.6.37 kernel.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>